- Notifications
You must be signed in to change notification settings - Fork6
Playground and evolution of learnings done in react native with typescript
License
rodrigoelp/reactnative-typescript
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
In here you will find a set of samples that I have been creating to help me understand how to work withreact-native andtypescript.
So, what is in this repo?
Multiple examples (and hopefully some explanation) of things you need to get react-native and typescript to work nicely between each other.
- Learn react-native
- Share with others working examples of react-native and typescript.
- Get feedback from others, if you have more knowledge and you have ways to improve these examples? by all means contribute to this or provide feedback. (Raise any feedback as an issue of this repo)
I want to learn how to start building apps onreact-native. Now, I've done web development in the past and I've also spent some time playing withnodejs so, I am not a complete foreigner to some of its concepts.
Now, React, React-Native and Node are technologies based on JavaScript, which inmy personal view is a pervasive, evil programming language that should've been improved a long time ago and no real consensus has been formed on what it should be. ES[5, 6, 7, etc] is a good first start but still is missing some important features for me. I like a static type system so I wanted something guiding me as I write my code.
So, I started looking at React-Native and other languages such as Typescript, Purescript, Kotlin, etc; and decided to settle withTypescript because:
- It has a big enough community backing it up.
- It seems to be close enough to JavaScript so porting samples between each other should be relatively straightforward.
- Requires fewer plugins/modules to work.
You will need already installed to use/try/abuse/copy/whatever this code:
I am a Mac user. Take these recommendations with a pinch of salt as it might not apply to your system.
- First and extremely important, you will need
git. Without it this repo might not make sense as every exercise has been stored in a separate repository and added to this one as submodules. If you want to check each individual project I have set up anindex with a basic description and observations gathered along its development process. - XCode with command line tooling installed already. This isrequired to run your code in iOS.
- Android Studio orVisual Studio for Mac with the Android tooling and an emulator.
- A text editor of sorts. I likevscode a lot.
- Node. Best way to get it into your system is viabrew as I have tried the mac installer and it wasn't as flexible as with brew. There are other mechanisms to get it such as thenode version manager but I found it was much easier to do
brew install node - You will need React-Native which can be installed via node package manager:
npm install react-native -g
Cloning a repo with submodules is not too much of a problem (although dealing with submodules can be a pain)
Just type in a terminal:
git clone --recursive -j8 git@github.com:rodrigoelp/reactnative-typescript.git
What are those parameters?
Pretty easy:
--recursivetellsgitthat you want to download everything in this repo, as well as anything included in the.gitmodulesfile.-j8tellsgityou want to download anything additional in parallel.
That's fine... if you have already typedgit clone git@github.com:rodrigo.elp/....git then you can initialize and download the exercises as follows (you must be at the root of the cloned project):
git submodule update --init --recursive
This will take care of the submodules and set it up for you.
Once you have downloaded the repo (or you could browse it in here) you will find inside the foldersamples each of my attempts. Inside there is a small explanation of what is contained.
If you want to read the intention behind any of the samples/exercises, open theindex file.
Enjoy and I hope you find this repo useful.
I am open to suggestions and improvements. Create an issue with your comment to talk it over.
Some of these samples could be used as a starter for your application (as it becomes fairly repetitive). If you want to use it to kickstart your project be my guest.
About
Playground and evolution of learnings done in react native with typescript
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.