New React Features: Concurrent Mode is revolutionizing the User Experience

The popular JavaScript Framework React from Facebook introduces new experimental Features: The Concurrent Mode combines several new Features that bring your React applications in the future without a Halt rendering. The new feature is similar to the Disruption of the development workflow, the Version Control systems caused.

With the introduction of the new, still experimental Features, the developers behind the Framework and findings of human-Computer interaction research.

According to the current state of the React render blocking other components, if one of the other Rendering process is in progress. A wonderful analogy, which leads also to the React documentation, Version Control. If you are working to more – or alone on a project that uses it most likely Git or another Version Control System. You will be working in Branches. When a Feature is finished, merged in the master branch, and the other can pullen. So far, so State-of-the-art Prior to Version Control systems such as Git, developers had to instruct you wanted to change something in the files within a project, your team members, as long as the fingers of the project until they had implemented the Change. The entire development process was blocked for the change period.

Roughly, one can think of the Rendering-process for today’s UI Libraries. As soon as an Update is rendered, for example, new DOM Nodes are created and the Code is executed within components, can not stop, the Library, for example, to React to this process.

Already started Renderings can be interrupted

What makes the Concurrent Mode Features so revolutionary is that the Rendering process is interruptible. Thus, the User Experience can be significantly better. When the User makes in the future, the Use of a React App is a command, holds React to the Browser in future as long to update the Input, until the previously set in motion the Rendering process is complete, but the Update of the Inputs can render quasi between the switch and the updated list in the Background. React updates the DOM, and the user can see the Changes on the screen.

Conceptually you could imagine, as it would React to prepare each Update on a Branch Of: you can have a less important Feature is also easy to change and be something else.

With the Concurrent Mode, the need for Debouncing and throttling of the UI will be reduced. Your Renderings you don’t have to artificially stop to prevent floor end Interfaces. You can start instantly, can be interrupted if necessary, at any time.

Build in intentional Loading Sequences

The following scenario: The User navigates between two Screens in an App. Sometimes the Code and data might not be enough of a load to give the User a sufficient charge status display. To switch to a blank screen, or to get a Spinner appear, sucks. A more elegant solution is to stay as long as the output view, until there is enough data and Code are loaded, the second display completely. To do this, it is not so easy – at least so far: With Concurrent Mode, this Feature is the Default. React prepares the new Screen in the Background – if you want to remain in the Git-metaphor: on a new Branch, while the remains of the home Screen but complete. The change to the new Screen only takes place when your App is ready.

For CPU-bound Updates how to Create DOM Nodes, or the execution of Code of the Concurrent Mode means that the more pressing Update may be a less important Rendering interrupt. For IO-bound Updates, to fetch, such as Code or data from a network, it means the Concurrency that React in the memory begins with the render before all data are available. The user is displayed in the meantime, instead of a blank screen or Spinners just the previous Screen. On the way you outsourcing work with React, will change the Concurrent Mode, nothing. Components, State and Props work exactly as before. If you want to update the view, puts her in the State. React decides after a heuristics, such as “urgent” is an Update that you can but in the case with a few lines of Code to customize.

TLDR: In Concurrent Mode, it’s all about priorities. According to the Status quo React can be a once started Rendering not interrupt. With concurrencymode React has prefer an eye on things, are otherwise just: Is there a thing with a higher priority, for example, a different Update or other tasks to be executed by the Browser will React in the future. The prioritization is based on findings from the human-Computer interaction research: interactions such as, for example, text input must take place in a relatively short period of time, clicks, or page change may take the Whole thing a little longer, without that we as users have the feeling that it would now-a-long.

Note: the new feature in the so-called Experimental State! The documentary strongly recommends not to use the new Feature, now in your projects. Available to Try it out, the Whole thing is joyful for the Curious and Experimental explicitly in a context where you don’t really have anything to do in and out you can. Who wants to test experiments and now: a Lot of fun!

This could also interest you

Ready to see us in action:

More To Explore
Enable registration in settings - general
Have any project in mind?

Contact us: