Inside React

Onoriode Commander
LearnFactory Nigeria
2 min readSep 13, 2019

My last Article on React was about the setup and the basics of React which was Component and how it works to my very first rendering. I can say that I have come a long way, from just my first rendering to making a Todo App that is still in progress, to which will be adding different Todo items to the app, removing, filtering, using localStorage and many more.

My journey on making a Todo App, I came in contact with “State, Props, Life cycle methods” and a whole lot more. I am now beginning to see React in a whole new light.

you’re gonna love this

Props could be set to a particular component and can also be used elsewhere while also been able to change the name and everything particular to that set. While “props” sounds interesting, “State” is a whole lot more, it controls what is been rendered to a component, which is what a component needs to be able to update its own state at every given time. State in a component is intended to be only accessible to its component and the children. Whenever the State changes the component will re-render. Changing state is done with React’s helper function “setState” called on the particular component.

LifeCycle, on the other hand, has to do with the processing time it takes a browser to load its components, the life cycle method called “componentDidMount” will come in place to check if the component you mounted actually “did mount”.

Furthermore, “componentDidUpdate” checks if the “State” of the render changes and then it will re-render the new “State” in which the component is now in.

Life cycle method with Local Storage

And my unfinished Todo App

My example is far from perfect, but I hope it was able to provide a beginner with some useful tips.

As I mentioned at the beginning of the article, this article is actually showing my progress to React.

--

--