Property 'children' does not exist on type 'IntrinsicAttributes & blahbah'
See original GitHub issue"@shopify/restyle": "^1.4.0",
"@shopify/restyle": "^1.4.0",
"typescript": "~4.0.0"
use the following code to generate a <Button> component
const theme = createTheme({
colors: {
mainBackground: "#F0F2F3",
cardPrimaryBackground: "#5A31F4",
},
});
type Theme = typeof theme
export const Button = createBox<Theme, TouchableOpacityProps>(TouchableOpacity);
When you use it directly, it will give you a type error:
It will be fixed if we change the declaration to:
export const Button = createBox<
Theme,
TouchableOpacityProps & { children?: React.ReactNode }
>(TouchableOpacity);
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:5
Top Results From Across the Web
ts(2322) Property children does not exist on type 'Intrinsic ...
I'm getting the following error while trying to create a multimap with 'date' as the key and then iterate through the multimap which...
Read more >React.js: Property 'children' does not exist on type 'X'
The React.js error "Property 'children' does not exist on type" occurs when we try access the children property in a component for which...
Read more >React 18 - Property 'children' does not exist fix [2022] - YouTube
... to React 18 and tried to follow tutorials from myself or others, you may run into the error: Property ' children '...
Read more >property 'children' does not exist on type 'intrinsicattributes
The "property 'children' does not exist on type 'intrinsicattributes" error is caused when you try to access the children property of a component...
Read more >Removal of implicit children - solverfox.dev
Explainer why we intend to get rid of implicit children in `@types/react` ... Property 'typ' does not exist on type // 'IntrinsicAttributes &...
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
I am running into the same issue with
createRestyleComponent
too. Worked around with usingPropsWithChildren
from React.Same problem. This library is fantastic, the best library I’ve found for react-native styling. But there is not enough documentation. I’m fighting with the same errors and there is just not resources or examples to help