Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 2.01 KB

2019-05-18.md

File metadata and controls

21 lines (11 loc) · 2.01 KB

How do I manage the balance between global and local state with React’s new hooks API and Context? This question has had me jumping from tutorials, blogs, and tweets in an effort to find the holy grail of state zen. I’ll be honest, though, it has left me scratching my head. I have yet to find my stride when it comes to managing state in its “proper” locality. So this post isn’t so much advice,

React is a set of open source tools for building user interfaces. React was open sourced by Facebook, and includes libraries for creating interfaces on the web (ReactJS) and on mobile devices (React Native).

The performance of applications on the web platform is becoming increasingly bottlenecked by the startup (load) time. Large amounts of JavaScript code are required to create rich web experiences that we’ve become used to. When we look at the total size of JavaScript requested on mobile devices from HTTPArchive, we see that an average page loads 350KB of JavaScript, while 10% of pages go over the 1MB threshold. The rise of more complex applications can push these numbers even higher.

Ever wondered how browsers read and run JavaScript code? It seems magic but you can get an hint of what’s happening under the hood.

Let’s begin our immersion in the language by introducing the wonderful world of JavaScript engines.

TypeScript 3.0 introduced a new unknown type which is the type-safe counterpart of the any type.