After we got clarity about learning only React and React's prerequisites, let's see how to learn React from zero from there. I strongly believe the best start is going through the official React documentation. The documentation keeps up with the recent changes, is not biased, teaches you everything the React way, and is put together by the React core team and the React community in your interest.
Being referred to the documentation of a library as a beginner in web development can be intimidating. But I strongly believe it's the best way to learn something new. On your career path to becoming a developer, you will get used to learn new things with the documentation of the new thing, so why not get used to it now? It comes with certain benefits to learn documentation driven:
- Beginner
- no commercial interest
- opinionated way of doing things
- Thoughtfully put together by core contributors and community.
- latest material and updates for new versions.
- API references.
Every time I pick up a new tech, I don't check any courses or books, I go straight to the tech's documentation and check whether there is a beginner tutorial. Often there is one and that's my entry point into a new world. From there, I can always check for other learning material, but my starting point will always be the official documentation of the new thing I intend to learn.
After all, that's why I write my tutorials and books in close relation to the documentation by always refereing it in my guides. That's how beginners learn to use the documentation and that's what will make them more efficient and effecrtive when learning a new tech in the future.
Learn React with Projects:
After you went through the React beginner tutorial from the React documentation and learned the basics of React from scratch, continue learning by building a project yourself before learning any other tech. It's not always simple to come up with project ideas, but there is plenty of inspiration out there.
For instance, there are also people who want to learn React by building games. I guess you will find plenty of React Tic Tac Toe implementations out there. Implement the game in React yourself and compare your solution to the other solutions. You will learn from your mistakes and learn to evaluate your source code against the implementation by others.
Learn React by Doing:
Learn React by doing is one of the most common recommendations you will get to hear from other developers, it applies to almost everything in life, because every task will present you with a new challenge to grow as a React developer. Also it is too easy to passively consume video courses, books, and tutorials. Get your hands dirty and implement something yourself. Get stuck with a problem, become desperate, ponder over the problem by taking time off the screen, solve the problem eventually, and reap the fruits of it. That's the basic framework of learning anything.
Learn React every Day:
Confront yourself to stick to coding every day. You can participate in the 100 Days of Code challenge, write about it on Twitter or on your website. Make it a daily habit. Only when sticking to it for a while, by having the persistence and by coding every day, you will eventually become a React developer. It's a marathon and not a sprint.
Learn React in Public:
The best way to learn something new is to learn it in public. Confront yourself with the feedback from other React developers by showing off your achievements. If you have reached a milestone with your React project, show it to others and ask for their feedback. These are a couple of commonly known platforms to share ideas around React:
- Twitter
- Reddit
- Reactiflux
- Spectrum
You will not only get feedback from people there, but also dive more into React by joining discussions. Be part of the community. Another great way to learn something new yourself is to explain it to someone else. Maybe you are one step ahead of a fellow React beginner and can help them out. Checkout the React Beginner Thread in the React Subreddit where you can help fellow React developers to solve their problems.
Learn to use React:
After you went through the beginner in React's docs and started to implement a React project yourself, learn to use React with all its facets. React has only a slim API surface area, so try to get proficient with it.
- Learn about React's JSX syntax
- Learn about React Components
- Learn about React Component Composition
- Learn about React Props
- Learn about React State
Learn and understand React. In the end, it doesn't need much to create a React component that returns JSX, to use a React component in another React component while arranging them in a component hierarchy, to pass data from component to component with props, and to make components interactive with state. That's the gist of React. Learn React in depth by applying your learned skills in your project and not by consuming endless of content.