测试POST
Intro React组件 Intro 组件 Intro 组件
测试自定义React组件 Intro 组件
Intro section
UL LI
- ReactDOM.render
- ReactDOM.render
- ReactDOM.render
- ReactDOM.render
- ReactDOM.render
- ReactDOM.render
- ReactDOM.render
- ReactDOM.render
- ReactDOM.render
- ReactDOM.render
ConsoleBlock
ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot
Note
Note
There is no one-to-one replacement for the old render callback API — it depends on your use case. See the working group post for Replacing render with createRoot for more information.
Deprecated
Deprecated
This API will be removed in a future major version of React. Use createRef instead.
Pitfall
Pitfall
This API will be removed in a future major version of React. Use createRef instead.
Wip
Under Construction
This API will be removed in a future major version of React. Use createRef instead.
TerminalBlock
npm help
CodeStep
codeStep1 codeStep2 codeStep3 codeStep4CodeBlock
npm help
export default function MyApp () {const [count, setCount] = useState(0);function handleClick() {setCount(count + 1);}return (<div><h1>Counters that update together</h1><MyButton count={count} onClick={handleClick} /><MyButton count={count} onClick={handleClick} /></div>);}
.├─ docs│ ├─ .vitepress│ │ └─ config.js│ ├─ api-examples.md│ ├─ markdown-examples.md│ └─ index.md└─ package.json
blockquote
Blockquote
useId
is not for generating Keys should be generated from your data.
Hr
Img
Link
externalLink - keys in a list
innerLink - button component
你好 测试
Tables | Are | Cool | Cool |
---|---|---|---|
col 3 is | right-aligned | $1600 | $1600 |
col 2 is | centered | $12 | $12 |
zebra stripes | are neat | $1 | $12 |