Portals let you render a bit of React-controlled DOM outside of the parent component. The React docs explain how to create a portal using a modal example. It works well for tooltips, too.
A portal works by taking an element and appending it to some other element. With React 16 portals, you aren’t limited to sticking it elsewhere in the current document. You can append it to the body in a different document, perhaps a document in an entirely different window and share state between the two different windows. This article goes through the details of adding a portal to a React application and sharing state between two different windows.
Using inline functions in React is convenient but can be contentious because of their perceived impact on performance. This week, the engineering team at Flexport introduced a solution to the debate: a Babel transform called
In Flexports React application, inline functions caused wasteful re-renderings of pure components. Since two different function instances are never equal, inline functions will cause the shallow equality comparison to fail, and thus will always trigger a re-render.
reflective-bind Babel transform allows you to write inline functions without triggering a re-render. Click the link to learn all the details of how it works!
There is now an official package for creating your own custom React renderer and this tutorial walks you through all the details of how to do it!
This two part blog series teaches you how to add authentication to a GraphQL + MongoDB+React Native application. In part one of this two part series you’ll learn how to configure a server (using GraphQL/Apollo, Mongo, Express, and JSON Web Tokens). In part two you'll setup the React Native client to interact with it all.