dripsy: The linear gradient component crashes the app on expo SDK 45.

Steps to Reproduce:

  1. Create an expo managed app with expo init (SDK 45);
  2. Install dripsy and @dripsy/gradient(3.6.0);
  3. Use the gradient component anywhere on the app.

Sample App.tsx


import { Gradient } from "@dripsy/gradient";
import { DripsyProvider, makeTheme } from "dripsy";
import { StatusBar } from "expo-status-bar";
import { Text } from "react-native";

const theme = makeTheme({...});

export default function App() {
  return (
    <DripsyProvider theme={theme}>
      <Gradient
        colors={["green", "blue"]}
        sx={{ flex: 1, alignItems: "center", justifyContent: "center" }}
      >
        <Text>Open up App.tsx to start working on your app!</Text>
        <StatusBar style="auto" />
      </Gradient>
    </DripsyProvider>
  );
}

Expected Result

The app runs crash free

Actual Result

Screen Shot 2022-05-08 at 8 50 58 PM

Screen Shot 2022-05-08 at 9 04 38 PM

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (13 by maintainers)

Most upvoted comments

I think just expo-linear-gradient should suffice, but that works too. I’ll make this a peer dep in a future release. Glad that worked!