Beginners guide to react
This is a going to be a series of posts that will be able to guide a beginner through the basics of react to be able to build simple applications and understand how react functions.
First, of all, we'll start with “what is react” and “why choose to learn react”.
What is react?
According to react’s official docs, React is a JavaScript library for building user interfaces and a quick Google search will give you “ React is a free and open-source front-end JavaScript library for building user interfaces based on UI components. It is maintained by Meta and a community of individual developers and companies“. It is widely used in web development, and quite popular to the extent I almost mistook it for a language at first since it was a constant requirement for Front-end roles.
Key points to note
1) it is a UI library
2) it is component-based
Why react?
The all-important question, A question I got from a senior developer when I first decided to pick up react after getting comfortable with the fundamentals of javascript. My exact answer was “ Want to be able to build web applications And react seems to be the popular choice”
With hindsight, I can now state other reasons why deciding to pick up react was a good choice Which are:
• Reusable components: React helps modularise code into functions called components(functions that return JSX), and if built properly can be reused across multiple pages and projects.
•It is quite easy to learn: since it is combines JSX(which looks like regular HTML) and regular Javascript, its learning curve favors someone that has a good grasp of the fundamentals of vanilla js and HTML
• it can be used to create both web and mobile apps(react native)
• There's a large community behind it, so it's easy to get information when you have to debug your code