Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. this.$setState({foo: 'bar'});
  2. this.$setState({john: 'doe'});
  3. this.$tick(() => {
  4. // DOM updated
  5. });
  6.  
  7. // Or with callback
  8. this.$setState({foo: 'bar'}, () => {
  9. // DOM updated
  10. });
  11.  
  12. // or with promise
  13. this.$setState({foo: 'bar'}).then(() => {
  14. // DOM updated
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement