React Flashcards
learn react for JS
What is a component?
A piece of reusable code that represents a part of a user interface.
What do components do?
Components are used to render, manage, and update the UI elements in your application.
What is a JSX element?
A JSX element is a combination of JavaScript code and HTML tags that describes what you’d like to display.
what is a fragment?
A feature that allows developers to group multiple elements together without adding extra nodes to the DOM.
(<> and </>)
What do fragments do?
Fragments group a list of children without adding extra parent elements. This helps keep the DOM structure cleaner and more organized.
What is a library?
- A collection of reusable code
*Reduces the need to write repetitive/complex things from scratch
*You control how/when it’s used. No/few boundaries.
What is a framework?
*Predetermined architecture - you follow a specified pattern of development
*You work within the boundaries set by the framework
*“Right” and “wrong” ways to use it.
When should you not to use a library or framework?
When you are doing a very small project like a static web page or when you have network load concerns. etc.