NextJS, React, Gatsby Flashcards
Do browsers understand JSX?
No - Note that browsers don’t understand JSX out of the box, so you’ll need a JavaScript compiler, such as a Babel, to transform your JSX code into regular JavaScript.
What are the 3 core concepts in React that you must know to build React application?
- -Components
- -Props
- -State
What are the 3 JSX rules?
1 - Return a single root element
2 - Close all the tags
3 - camelCase all most of the things!
What are the 9 things you need to consider when building modern web applications?
User Interface - how users will consume and interact with your application
Routing - how users navigate between different parts of your application.
Data Fetching - where your data lives and how to get it.
Rendering - when and where you render static or dynamic content.
Integrations - what third-party services you use (CMS, auth, payments, etc) and how you connect to them.
Infrastructure - where you deploy, store, and run your application code (Serverless, CDN, Edge, etc).
Performance - how to optimize your application for end-users.
Scalability - how your application adapts as your team, data, and traffic grow.
Developer Experience - your team’s experience building and maintaining your application.
What is a component?
A component is a function that returns UI elements.
const app = document.getElementById(“app”)
function header() { return (<h1>Develop. Preview. Ship. 🚀</h1>) }
ReactDOM.render(, app)
What is JSX?
A syntax extension for JavaScript that allows you to describe your UI in a familiar HTML-like syntax
What is NextJS?
A React framework that gives you building blocks to create web applications.
What is React?
A JavaScript library for building interactive user interfaces.
What is the DOM?
The DOM is an object representation of the HTML elements. It acts as a bridge between your code and the user interface, and has a tree-like structure with parent and child relationships.
Important terms
- -Component Tree
- -Nesting Components
In React which way does data flow?
Data flows down the component tree. This is referred to as one-way data flow.
State can be passed from parent to child components as props.
Here are the topics you will learn about in this comprehensive course:
Local setup Why React? JSX ReactDOM.render() Custom components Organizing components Reusable components JS inside JSX Props Destructuring props Rendering arrays Mapping components Key prop Passing objects as props Spreading objects as props Props vs state useState useState array destructuring Changing state Complex state Refactoring state Passing state as props Local state Unified state Conditional rendering React forms Forms input Forms state object Submitting forms in React Making API calls useEffect Async functions inside useEffect Local storage with React Lazy state initialization
What is meant when it’s said that react is composable?
This means that code can be written in small components
What is create-react-app?
A tool for building SPAs with a standard structure and a good set of default options. Generated projects use the React Scripts library to build, test, and run the code. Projects have a standard Webpack configuration and a standard set of language features enabled.
npm launches a server on port 3000 and opens a browser at the homepage. How is this page being rendered?
it renders a single component called , which it imports from App.js (or App.tsx) in the same directory.
The application is delivered as a single, large bundle of JavaScript. The code mounts all of its components inside this <div> in public/index.html:
<div></div>
</div>