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

React Native stylesheet merge: Spread types may only be created from object types

$
0
0

I'm trying to merge an existing style with my extra styling in React Native's regular StyleSheet.create method:

const styles = StyleSheet.create({
    blurView:{
        ...StyleSheet.absoluteFill,
        borderRadius: 24
    },

});

However I'm getting the following error on line ...StyleSheet.absoluteFill:

Spread types may only be created from object types.

What am I doing wrong? I know I can pass an array into style prop, but I'm just curious why this isn't working.


Viewing all articles
Browse latest Browse all 6208

Trending Articles



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