First Look Into React Flashcards
Why don’t we use vanilla JS when creating large sites:
This can lead to spaghetti code. Additionally, storing data in the DOM and sharing it across the application can result in numerous bugs.
Why do front-end frameworks exist?
Frameworks exist because they make it easier to keep a user interface in sync with data. Another reason they exist is that they enforce a correct way of structuring and writing code. Additionally, they provide developers and teams with a consistent way of building front-end applications.
What is React?
React is a JavaScript library for building user interfaces. In a longer definition, React is an extremely popular declarative, component-based, state-driven JavaScript library for building user interfaces, created by Facebook.
What are components?
Components are the building blocks for user interfaces in React. We build complex UIs by creating multiple components and combining them. We can also reuse components, making our codebase smaller and more DRY (Don’t Repeat Yourself).
What does declarative mean?
Declarative means telling React what a component should look like, based on current data.
What does the JSX syntax combine?
JSX is a syntax that combines HTML, CSS, and JS as well as referencing other components.
What does state-driven mean?
“State-driven” in React means that React responds to state changes and updates the page to reflect the current data.