Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点滴记录(react) #3

Open
jindada opened this issue Jun 8, 2017 · 0 comments
Open

点滴记录(react) #3

jindada opened this issue Jun 8, 2017 · 0 comments
Labels

Comments

@jindada
Copy link
Owner

jindada commented Jun 8, 2017

1 . render可以直接return null

import React from 'react';
const App = () => null

2 . setState 是异步的,并且有回调函数

console.log(this.state.value);  // 1
this.setState({
  value: 2
}, () => {
  console.log(this.state.value);  // 2
})
console.log(this.state.value);  // 1
@jindada jindada added the react label Sep 19, 2017
@jindada jindada changed the title 那些不能说的秘密 react篇 点滴记录(react) Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant