Skip to content

React Framework

Master React Framework with 50 free flashcards. Study using spaced repetition and focus mode for effective learning in Programming.

🎓 50 cards ⏱️ ~25 min Advanced
Study Full Deck →
Share: 𝕏 Twitter LinkedIn WhatsApp

🎯 What You'll Learn

Preview Questions

12 shown

What is React?

Show ▼

React is a JavaScript library developed by Facebook for building user interfaces. It uses a component-based architecture and a virtual DOM for efficient rendering of dynamic, interactive web applications.

What is JSX?

Show ▼

JSX stands for JavaScript XML. It is a syntax extension that lets you write HTML-like code inside JavaScript. JSX is transpiled to React.createElement() calls by tools like Babel before running in the browser.

What is the Virtual DOM?

Show ▼

The Virtual DOM is a lightweight in-memory representation of the real DOM. When state changes, React creates a new virtual DOM tree, diffs it against the previous one, and applies only the minimal set of changes to the real DOM — a process called reconciliation.

What is a functional component in React?

Show ▼

A functional component is a plain JavaScript function that accepts props as an argument and returns JSX. Example:
function Greeting({ name }) { return <h1>Hello, {name}</h1>; }

What is a class component in React?

Show ▼

A class component is an ES6 class that extends React.Component and must implement a render() method. It can hold local state and use lifecycle methods:
class App extends React.Component { render() { return <h1>Hello</h1>; } }

What are props in React?

Show ▼

Props (short for properties) are read-only inputs passed from a parent component to a child component. They allow data to flow top-down (unidirectional) through the component tree and cannot be modified by the receiving component.

What is state in React?

Show ▼

State is a mutable data object managed within a component that determines how the component renders and behaves. When state changes, React re-renders the component. In functional components, state is managed with the useState hook.

How does the useState hook work?

Show ▼

useState returns an array with two elements: the current state value and a setter function.
const [count, setCount] = useState(0);
Calling setCount(count + 1) schedules a re-render with the updated value.

What is the useEffect hook?

Show ▼

useEffect lets you perform side effects in functional components (data fetching, subscriptions, DOM manipulation). It runs after render.
useEffect(() => { /* effect */ return () => { /* cleanup */ }; }, [dependencies]);

What does the dependency array in useEffect do?

Show ▼

The dependency array controls when the effect runs:[] — runs only on mount[a, b] — runs when a or b changeNo array — runs after every render

What is the useContext hook?

Show ▼

useContext lets a component consume a value from a React context without wrapping it in a Context.Consumer.
const value = useContext(MyContext);
The component re-renders whenever the context value changes.

What is the useReducer hook?

Show ▼

useReducer is an alternative to useState for complex state logic. It accepts a reducer function and initial state:
const [state, dispatch] = useReducer(reducer, initialState);
You update state by dispatching actions to the reducer.

🎓 Start studying React Framework

🎮 Study Modes Available

🔄

Flashcards

Flip to reveal

🧠

Focus Mode

Spaced repetition

Multiple Choice

Test your knowledge

⌨️

Type Answer

Active recall

📚

Learn Mode

Multi-round mastery

🎯

Match Game

Memory challenge

Related Topics in Programming

📖 Learning Resources