What is React?
React vs Angular 2
- Considered a Library
- Easier to Learn
- Uses JSX for its preprocessor. Although it is not required but highly recommended.
- One way Binding – HTML can’t change your component, it submits an action and your component reacts to that and updates the view.
- Considered a Framework
- Bigger learning curve
- Two-way binding. e.g. Your HTML can change and your component and your component can change your HTML
- Easy to scale
What I like and Dislike about React
- Very easy to start especially with create-react-app.
- Easily added to a project via a script tag.
- Component based, so everything is encapsulated.
- Good Documentation
- The way it handles state. The State basically stores the data of your application. Each component has its own state, therefore one component can’t update another components state directly. The recommended architecture for React apps is to store the state at the “highest component”. e.g. App.js which can be used as a meeting place for all other components. The State would be stored in app.js so it can be shared between components. This is the hardest part of learning React in my opinion.
- Events in Components need to “bubbled up” to the top level component (e.g. App.js) just like state changes.
- JSX can be awkward to work with.
Now I have given my opinions on React maybe you are interested and want to try it. Here are my recommended resources for getting started with React as quick as possible.
- [1h] React Crash Course by Traversy Media
- [1h30] Learning React series by Traversy Media
- [1-2h] Official React Tutorial by Facebook
I haven’t read any books on React but I will be in the near future. I wanted to provide links to get you up and running ASAP.
I hope you enjoy this post about React. It is an interesting library and it really does what it says. As with all libraries and Frameworks I learn, the next part of my learning is to build a Project with it. I am going to be creating my own Development portfolio using React. This will give me a chance to see exactly what React is capable of while also showing me its limitations. When I finish I will, of course, write about and give my further options on React. I hope you enjoyed this post if you have any React learning resources let me know!.