GithubHelp home page GithubHelp logo

reactjs-learn's Introduction

Reactjs 学习

开发环境:intellij idea 15.0.2

jsx语法支持设置:Note also that you need to set JavaScript Language Version to 'JSX Harmony' in Settings/Languages&Frameworks/JavaScript to get JSX syntax correctly recognized.

basic

这是一个基础类,定时器,没有使用jsx语法,创建一个React类,类的render()方法是必须的,返回值是要渲染的DOM元素.可以使用ReactDOM.Render()去渲染,接受两个参数,一个是React实例化后的类,一个是要渲染的DOM元素.

click

这个demo展示一个定时器,用了jsx语法,在一个React子类中,这个button有自己的状态来记录被点击了多少次,每次点击时就会更新点击次数.通过ReacDOM去渲染.

reactjs-learn's People

Watchers

James Cloos avatar Fiona avatar

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.