Working with React
This article will be updated with new information as I build and continue to learn more.
React is maintained by Facebook, Instagram and a community of individual developers and corporations. React is currently being used on the websites of Facebook, Instagram, Netflix, Imgur, Bleacher Report, Feedly, Airbnb, SeatGeek, HelloSign, and others.”
Some of the ideas and concepts I’ve learned since working with React are:
Probably the most important concept in React is the concept of “State”. State is described as how a React component’s data looks at any moment in time. This concept is better explained elsewhere by people far better at this that I so I will leave it to you to find resources about this. I may come back to this at a later moment and flesh this section out.
One-way data flow
Properties, a set of immutable object values, are passed to a component’s renderer as properties in its HTML tag. A component cannot directly modify any properties passed to it, but can be passed callback functions that do modify values. This mechanism is expressed as “properties flow down; actions flow up”. As an example of this, in my app, I have a concept called “selected video” that flows down all the way from the “App” concept to “Video List”, to “Video List Item”.
Another notable feature is the use of a “virtual DOM.” React creates an in-memory data structure cache, computes the resulting differences, and then updates the browser’s displayed DOM efficiently. This allows the programmer to write code as if the entire page is rendered on each change while the React libraries only render subcomponents that actually change. Basically, this “virtual” or “shadow” DOM pushes only the needed page changes to the “real” DOM.
NPM Server Error Reporting
Errors such as syntax errors and whatnot are pretty easily found in the NPM server log, which is pretty amazing. I always know exactly where to look to begin debugging the issue. I am definitely a fan of that.