menu_book Course Curriculum (React) expand_more
Components & JSX
State & Hooks
Effects & External Systems
Forms & Composition
Concurrent React
Lifting state up
Learn Lifting state up in React with a dedicated explanation, a concept-specific example, a production caution, and a mastery check.
12 min read
•
Intermediate
react-028.tsx
tsx
import { useState } from "react";
function Celsius({value,onChange}){return <input value={value} onChange={e=>onChange(e.target.value)}/>};
export default function App(){const [c,setC]=useState("20");return <><Celsius value={c} onChange={setC}/><p>{c}°C</p></>}
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content