Why do all Recompose recipes start with "const {Component} = React;"

Why do all Recompose recipes start with const { Component } = React;if they don’t use Component, or are they?

What does the beginning of the recipe matter?

https://github.com/acdlite/recompose/wiki/Recipes

+4
source share
1 answer

This is due to the use of JSX in code. JSX translates to React.createElement, which obviously uses React.

0
source

Source: https://habr.com/ru/post/1691153/


All Articles