@expo/html types errors
See original GitHub issueI’m weirdly getting this error again. Seems like something changed with React’s types, since I’m getting this after upgrading to Expo SDK40:
Type '{ children: string; }' is not assignable to type '(IntrinsicAttributes & Pick<StyledProps<TextProps>, "style" | "sx" | "themeKey" | "variant" | "variants" | "as" | "webContainerSx"> & Pick<...> & WebTextProps & RefAttributes<...>) | (IntrinsicAttributes & ... 4 more ... & RefAttributes<...>)'.
Type '{ children: string; }' is missing the following properties from type 'Pick<TextProps & ClassAttributes<typeof Text>, "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | ... 29 more ... | "accessibilityTraits">': accessibilityComponentType, accessibilityTraits
56 <H3>{title}</H3>
I think we need to add a { children?: React.ReactNode } to the return type of createThemedComponent…not sure. Will investigate this more. Using dripsy@1.4.6
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Dealing with global errors in React-Native Expo as simple as ...
The ErrorUtils is a global property in React-Native projects, you can use it directly. First, store the default error handler: const ...
Read more >Enforcing Consistent Code in Expo React Native Projects
Enforcing Consistent and Error Free Code in an Expo React Native Project with TypeScript. Improve your team's code quality and efficiency by ...
Read more >after updating expo: Element type is invalid: expected a string ...
After I updated my Expo SDK from 39 to 42, I got following error when trying to launch the app: Error: Element type...
Read more >Configuration with app.json / app.config.js
Learn about what is Expo config and how you can dynamically use it by customizing it. ... You can think of this as...
Read more >expo-web-browser - npm
expo -web-browser. TypeScript icon, indicating that this package has built-in type declarations · Readme · Code Beta · 1 Dependency · 102 Dependents ......
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

Related: https://github.com/facebook/react-native/issues/24016, https://github.com/callstack/react-native-paper/issues/1962
Okay, I identified the issue.
For some reason, the react native
TextPropsare now requiring two props:accessibilityComponentType&accessibilityTraits. No idea why. I tried downgrading versions of@types/react-nativeto no avail.However, with some declaration merging, I was able to solve it by just making them optional.
All you need to do is put this TS file anywhere in your app: