React 学习笔记 1 React 是什么

简介: 实例https://codepen.io/penimage.pnghttps://github.com/facebook/reactA declarative, efficient, and flexible JavaScript library for building user interfaces.

实例

https://codepen.io/pen

image.png

https://github.com/facebook/react

A declarative, efficient, and flexible JavaScript library for building user interfaces.

https://reactjs.org

React is a JavaScript library for building user interfaces.

  • Declarative:

    React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more predictable, simpler to understand, and easier to debug.

  • Component-Based:

    Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM.

  • Learn Once, Write Anywhere:

    We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code. React can also render on the server using Node and power mobile apps using

    React Native.

Learn how to use React in your own project.

传统的浏览器 DOM 操作与维护复杂性越来越高。
React 的出现正式为了解决 DOM 操作的问题。

React 的闪光点是在应用数据发生变化的时候。React 中有个 state 的概念。当 state 发生改变时,React 会自动 render 用户界面。这个时候,数据本身的变化成为我们真正需要关注的点。

JSX 语法

https://reactjs.org/docs/introducing-jsx.html

https://reactjs.org/docs/jsx-in-depth.html

React.Component

https://reactjs.org/docs/react-component.html

相关文章
|
2月前
|
开发框架 前端开发 JavaScript
从零开始学习React Native开发
React Native是一种基于React框架的移动端开发框架,使用它可以快速地构建出高性能、原生的移动应用。本文将从零开始,介绍React Native的基础知识和开发流程,帮助读者快速入门React Native开发,并实现一个简单的ToDo应用程序。
|
4月前
|
人工智能 JSON 前端开发
react17+ts 学习
react17+ts 学习
|
1月前
|
运维 JavaScript 前端开发
发现了一款宝藏学习项目,包含了Web全栈的知识体系,JS、Vue、React知识就靠它了!
发现了一款宝藏学习项目,包含了Web全栈的知识体系,JS、Vue、React知识就靠它了!
|
1月前
|
前端开发
React学习笔记(一)
React学习笔记(一)
|
1月前
|
前端开发
React学习笔记
React学习笔记
|
2月前
|
存储 前端开发 JavaScript
从零开始学习React Native开发
【2月更文挑战第1天】React Native是一种跨平台的移动应用程序框架,可以使用JavaScript和React来构建Android和iOS应用程序。本文将带您从零开始学习React Native开发,涵盖了基础知识、组件、样式、布局、API等方面。
|
3月前
|
Rust 前端开发 JavaScript
IM跨平台技术学习(十):快速对比跨平台框架Electron、Flutter、Tauri、React Native等
在本文中,我们将比较五种流行的桌面应用程序开发框架:Electron、Flutter、Tauri、React Native 和 Qt,希望可以帮助你根据项目需求做出明智的技术选型决策。
150 2
|
4月前
|
前端开发 JavaScript API
中国农村大学生学习了这个【React教程】迎娶导师女儿,出任CEO走上人生巅峰
中国农村大学生学习了这个【React教程】迎娶导师女儿,出任CEO走上人生巅峰
37 0
|
4月前
|
前端开发 JavaScript
《Webpack5 核心原理与应用实践》学习笔记-> React全栈环境
《Webpack5 核心原理与应用实践》学习笔记-> React全栈环境
38 0
|
16天前
|
前端开发
【React学习】—SetState的使用(九)
【React学习】—SetState的使用(九)