Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

React Native: Getting error "Property 'style' does not exist on type 'IntrinsicAttributes & ..." when passing inline style prop to component

$
0
0

From reading other SO questions/answers I understand the solution to this problem (simply add style to my component's props object) but I don't understand why this is necessary.

Isn't style an IntrinsicAttribute?! If so, why is it necessary to explicitly define it in my component's props object, like so:

export const MyComponent = ({ ...other props, style }) => {    // Component body redacted for brevity};

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>