From 434be5d01951ca2f87e2739f8f38e53ae9b4e6b4 Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Wed, 23 Jan 2019 15:17:18 +0000 Subject: [PATCH] Deploy website Deploy website version based on daea66cf51c559f8077e78ef0808cfd8c54b961d --- docs/next/state.html | 2 +- docs/next/state/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/next/state.html b/docs/next/state.html index 8ca687f2d16..f131c7dad8c 100644 --- a/docs/next/state.html +++ b/docs/next/state.html @@ -80,7 +80,7 @@ AppRegistry.registerComponent('AwesomeProject', () => BlinkApp); -

In a real application, you probably won't be setting state with a timer. You might set state when you have new data arrived from the server, or from user input. You can also use a state container like Redux or Mobx to control your data flow. In that case you would use Redux or Mobx to modify your state rather than calling setState directly.

+

In a real application, you probably won't be setting state with a timer. You might set state when you have new data from the server, or from user input. You can also use a state container like Redux or Mobx to control your data flow. In that case you would use Redux or Mobx to modify your state rather than calling setState directly.

When setState is called, BlinkApp will re-render its Component. By calling setState within the Timer, the component will re-render every time the Timer ticks.

State works the same way as it does in React, so for more details on handling state, you can look at the React.Component API. At this point, you might be annoyed that most of our examples so far use boring default black text. To make things more beautiful, you will have to learn about Style.

← PropsStyle →