Baike.dev
All toolsTrendingOpen sourceNewsSubmit
Log in
< 返回工具列表
R

react-demos

> 编程语言
开源

a collection of simple demos of React.js

16.5K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

a collection of simple demos of React.js

This is a collection of simple demos of React.js. These demos are purposely written in a simple and clear style. You will find no difficulty in following them to learn the powerful library. ## Related Projects - [Flux Demo](https://github.com/ruanyf/extremely-simple-flux-demo) - [Webpack Demos](https://github.com/ruanyf/webpack-demos) - [React Router Tutorial](https://github.com/reactjs/react-router-tutorial) - [CSS Modules Demos](https://github.com/ruanyf/css-modules-demos) - [React Testing Demo](https://github.com/ruanyf/react-testing-demo) - [A boilerplate for React-Babel-Webpack project](https://github.com/ruanyf/react-babel-webpack-boilerplate) ## How to use First, copy the repo into your disk. ```bash $ git clone [email protected]:ruanyf/react-demos.git ``` Then play with the source files under the repo's demo* directories. ## HTML Template ```html ``` ## Index 1. [Render JSX](#demo01-render-jsx) 1. [Use JavaScript in JSX](#demo02-use-javascript-in-jsx) 1. [Use array in JSX](#demo03-use-array-in-jsx) 1. [Define a component](#demo04-define-a-component) 1. [this.props.children](#demo05-thispropschildren) 1. [PropTypes](#demo06-proptypes) 1. [Finding a DOM node](#demo07-finding-a-dom-node) 1. [this.state](#demo08-thisstate) 1. [Form](#demo09-form) 1. [Component Lifecycle](#demo10-component-lifecycle) 1. [Ajax](#demo11-ajax) 1. [Display value from a Promise](#demo12-display-value-from-a-promise) 1. [Server-side rendering](#demo13-server-side-rendering) --- ## Demo01: Render JSX [demo](http://ruanyf.github.io/react-demos/demo01/) / [source](https://github.com/ruanyf/react-demos/blob/master/demo01/index.html) The template syntax in React is called [JSX](http://facebook.github.io/react/docs/displaying-data.html#jsx-syntax). JSX allows you to use HTML tags in JavaScript code. `ReactDOM.render()` is the method which translates JSX into HTML and renders it into the specified DOM node. ```js ReactDOM.render(

Hello, world!

, document.getElementById('example') ); ``` To actually perform the transformation in the browser, you must use `

核心特点

  • •Flux Demo
  • •Webpack Demos
  • •React Router Tutorial
  • •CSS Modules Demos
  • •React Testing Demo
  • •A boilerplate for React-Babel-Webpack project

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月9日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言
Baike.dev

baike.dev helps you discover great languages, frameworks, databases, DevOps and cloud-native tools.

Quick links

  • Home
  • All tools
  • Trending
  • Open source

About

  • About us
  • Community
  • News

Contribute

Found a great developer tool? Share it with the community.

Submit a tool
© 2026 baike.dev Developer EncyclopediaUpdated daily · Discover great developer tools