摘要:
阅读全文
posted @ 2022-11-05 20:41
前端导师歌谣
阅读(13)
评论(0)
推荐(0)
摘要:
app.js const App = () => { return <div>我是App组件!</div> }; // 导出App export default App; index.js /* * 组件 * - React中组件有两种创建方式 * - 函数式组件 * - 函数组件就是一个返回JSX 阅读全文
posted @ 2022-11-05 20:41
前端导师歌谣
阅读(21)
评论(0)
推荐(0)
摘要:
主界面 import ReactDOM from 'react-dom/client'; // 引入样式表 import './index.css'; // 创建一个React元素 const App = <div className="logs"> {/* 日志项容器 */} <div class 阅读全文
posted @ 2022-11-05 20:41
前端导师歌谣
阅读(50)
评论(0)
推荐(0)
摘要:
index.html <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>React项目</title> </head> <body> <div id="root"></div> <!-- public/inde 阅读全文
posted @ 2022-11-05 20:41
前端导师歌谣
阅读(29)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>虚拟DOM</title> <script src="script/react.development.js"></script> <script src="s 阅读全文
posted @ 2022-11-05 20:41
前端导师歌谣
阅读(39)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>渲染列表</title> <script src="script/react.development.js"></script> <script src="sc 阅读全文
posted @ 2022-11-05 20:41
前端导师歌谣
阅读(42)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>JSX的注意</title> <script src="script/react.development.js"></script> <script src=" 阅读全文
posted @ 2022-11-05 20:41
前端导师歌谣
阅读(35)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>JSX</title> <script src="script/react.development.js"></script> <script src="scr 阅读全文
posted @ 2022-11-05 20:41
前端导师歌谣
阅读(29)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>三个API</title> <script src="script/react.development.js"></script> <script src="s 阅读全文
posted @ 2022-11-05 20:41
前端导师歌谣
阅读(18)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>Hello World</title> <!--引入react的核心库--> <script src="script/react.development.js" 阅读全文
posted @ 2022-11-05 20:41
前端导师歌谣
阅读(14)
评论(0)
推荐(0)

浙公网安备 33010602011771号