Why do all the Recompose recipes start with const { Component } = React;
when they don't use Component
, or do they?
What's the significance of starting the recipe like that?
Why do all the Recompose recipes start with const { Component } = React;
when they don't use Component
, or do they?
What's the significance of starting the recipe like that?
This is because of the use of JSX in the code. JSX is transpiled to React.createElement, which obviously uses React.