Export a generic list of html elements
Open
discussion
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
## Proposal
Export a generic HTMLIntrinsics type, in addition to JSXIntrinsics.
[Line 271](https://github.com/facebook/flow/blob/v0.104.0/lib/react-dom.js#L271) removes the ability to verify a string is a valid html element
## Use case
For example:
```
const generateComponent = (ComponentString: $Keys<$JSXIntrinsics>, styleObject) => {
return
}
const ValidComponent = generateComponent('div'); // Works
const ShouldThrowErrorComponent = generateComponent('divv'); // Works! but it should fail
```
Without disrupting the existing behavior of JSXIntrinsics, we could add HTMLIntrinsics.
Contributor guide
Assessment
This issue has not been assessed yet.