Flow `className` is missing in `ViewProps`
See original GitHub issueHi 😃 Excellent module. Thank you 🙏
I’m using Flow types in my RN app. And it reports…
Flow: Cannot create `View` element because property `className` is missing in `ViewProps` [1] but exists in props [2].
I see that this was solved for Typescript in https://github.com/marklawlor/nativewind/issues/124#issuecomment-1190630695
Any suggestions on how to solve this for Flow? I’m hoping we can extend Flow config somehow… 🤔
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
ClassName props is missing in object type. Flow and CSS ...
I Cannot create View element because property className is missing in object type [1] but exists in props [2]. What can I do?...
Read more >Can't pass props with excess properties · Issue #15463 - GitHub
@yuit I have compiled my code via build 2.4.0-dev.20170509, the error is gone. So I am waiting for v2.3.3 to move on.
Read more >Deciphering TypeScript's React errors | by Fiona Hopkins |
Property 'fieldName' is missing in type '{}'. — Now TypeScript is being specific about why an object of type {} is not assignable...
Read more >React: Type {children: Element} has no properties in common ...
The React.js error Type {children: Element} has no properties in common with type IntrinsicAttributes occurs when we try to pass a `children` prop...
Read more >Props List API - React Flow
Array of nodes (for an uncontrolled flow) ... Called when user connects two nodes in a controlled flow ... Additional class name for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Typescript solves this via module augmentation, which allows custom types to be merged on top of the RN types. https://github.com/marklawlor/nativewind/blob/main/packages/nativewind/types.d.ts
I’m trying to find a similar concept in Flow
I’m not a Flow user so I’ll have to do some research into how module augmentation works within it’s type system
If you know of other libraries that were written in Typescript but have good Flow types can you let me know and I’ll look at their workflow.