![changing state flowstate changing state flowstate](http://voyagemia.com/wp-content/uploads/2020/01/anp-50.jpg)
You feel less self-conscious and even less anxious. You’re absorbed in the task, but not stressed out or worried by it. This transformation of time comes from being completely absorbed in the present moment. It can speed up or slow down - but either way, you’re a little surprised when you check the clock. This triggers a sort of altered consciousness around time. When you’re in flow, you feel lost in the activity. As a spectator, it’s difficult to have the mental absorption and sense of engagement that characterizes a flow state. You’ll have a hard time getting into flow if you feel like the activity or situation is out of your control. You win a game, finish a level, or earn a star - which keeps you playing because you feel like you’re doing well.
![changing state flowstate changing state flowstate](http://i1.wp.com/coder-tronics.com/wp-content/uploads/2013/08/State-Machine-Diagram.jpg)
Ever spend hours playing one of those puzzle games on your computer or phone? They’re engrossing because they give immediate feedback. There is a give-and-take of energy in the activity.
![changing state flowstate changing state flowstate](https://i.pinimg.com/originals/23/8f/cf/238fcf1b165966669f98fd42f8bd237a.png)
But in order to direct your attention, you have to have something to direct your attention to. It doesn’t have to be grandiose - you could be playing a video game or coloring a picture. To trigger flow, the activity has to have some point to it. Too challenging, and you won’t be able to get into it. Too easy, and it won’t be absorbing enough. The activity has to be the right amount of difficult. Someone would have to work to get your attention or to interrupt you from the task at hand. In flow, whatever you’re working on has your complete attention. But the more factors are present, the more likely you are to experience flow. It could happen while you’re reading, writing, painting, running, or gardening.Īlthough there’s no one activity guaranteed to create flow, there are some common characteristics of flow state that people experience.
![changing state flowstate changing state flowstate](https://i.stack.imgur.com/fNZbI.png)
There’s no one experience that leads to flow. In flow, you feel as if you could keep doing whatever you’re doing forever. You generally lose sense of time, self-consciousness, and anything that doesn’t have to do with the task at hand.
#Changing state flowstate update
Have a look at the docs here for more info: ĭon't forget that calling renderComponent again on an already mounted component doesn't mount it again, it just tells react to update the component's props and react will then make the changes, run the lifecycle and render functions of the component and do it's dom diffing magic.The flow state is the experience of being so absorbed by an engaging, enjoyable task that your attention is competely held by it.
#Changing state flowstate code
Likewise if you wanted to hide it from outside, simply call it with showAdvanced: false.Īdded bonus to the above code example is that calling setState inside of componentWillReceiveProps does not cause another render cycle, as it catches and changes the state BEFORE render is called. So, someone external calls cmp.setState(), elem) and it will show it, regardless of internal state. The user should be able to click "Hide Advanced" to close it again, however. That's straightforward and working fine, there's a showAdvanced key in the state that controls the text and whether the advanced input is rendered.Įxternal JS code, however, might change the value of advanced, in which case I want to show the input if it's currently hidden and the value is different than the default. The advanced on the bottom goes away if you click "Hide Advanced", which changes to "Show Advanced". I've got a React component with an input, and an optional "advanced input":