Description
While attempting to import the <Dropdown> component from Flame in the new insights app, we ran into a Typescript issue where the app wouldn't compile because children is not a valid prop in the Dropdown interface.
The insights app is using React 18 and in that version React.FC no longer includes children by default.
So any Flame components that
- use
React.FC
- include a
children prop
- don't type their props to include
children or extend a type that does so (e.g. Box)
will probably need to be updated to be compatible with React 18 and TS.
Requirements
Dependencies
<Dropdown> and other similar components that take children can be successfully used in a React 18 / Typescript project, like lighthouse-insights.
Required before signoff
n/a
Design/Examples
n/a
Description
While attempting to import the
<Dropdown>component from Flame in the new insights app, we ran into a Typescript issue where the app wouldn't compile becausechildrenis not a valid prop in theDropdowninterface.The insights app is using React 18 and in that version React.FC no longer includes
childrenby default.So any Flame components that
React.FCchildrenpropchildrenor extend a type that does so (e.g.Box)will probably need to be updated to be compatible with React 18 and TS.
Requirements
Dependencies
<Dropdown>and other similar components that takechildrencan be successfully used in a React 18 / Typescript project, like lighthouse-insights.Required before signoff
n/a
Design/Examples
n/a