DEV Community

Kaleb
Kaleb

Posted on • Edited on

Enjoy react key takeaways from a new developer.

Welcome back to my second blog on DEV. I have completed phase 2 of FlatIron school and this phase covered react. Phase 1 was JavaScript, phase 2 was React with phase 3 being Python and SQL. React was difficult for me due to a lot of different concepts and learning it a lot faster than javascript.

Key Topics Covered in This Blog:

The Impact React had on me as a developer
The useState Hook
Lastly Props

Starting with React's had on my understanding of web development, it's hard to write how it changed my preception. Now, when I scroll through Facebook or click a link, I know that it triggers an onClick event, followed by a GET request. Understanding this process has been extremely impactful on my day-to-day, and I enjoyed working with React.

Understanding and Using useState:
Initially, useState was nothing short of a challenge. Its syntax and the concept of hooks were completely new to us as students. However, useState was very helpful and was the backbone in our project and for React projects in general. It allows us to update the page without refreshing it. To explain the syntax, the useState is defined as const [state, setState] = useState(). When setState(Anything) is called, it triggers a re-render and updates the page. The state variable holds the value of Anything, which could be data from a fetch request, a boolean for a loading feature, and so on.

Props:
Props are similar to arguments in JavaScript but are different. They allow you to pass functions, state or setState, variables, and data. Props allow you to pass what you will need to other files. You need to send props and accept them. Props can be deconstructed and go hand and hand with state.

Top comments (0)