gorhom / react-native-bottom-sheet

A performant interactive bottom sheet with fully configurable options 🚀
https://gorhom.dev/react-native-bottom-sheet/
MIT License
7.04k stars 768 forks source link

[v4] SyntaxError in BottomSheetBackdrop.tsx that does not make sense #728

Closed pke closed 3 years ago

pke commented 3 years ago

Bug

Getting

error: SyntaxError: /Users/pkursawe/projects/lego-feature/app/node_modules/@gorhom/bottom-sheet/src/components/bottomSheetBackdrop/BottomSheetBackdrop.tsx: /Users/pkursawe/projects/lego-feature/app/node_modules/@gorhom/bottom-sheet/src/components/bottomSheetBackdrop/BottomSheetBackdrop.tsx: Unexpected token, expected ";" (4:6)

  2 | (() => {
  3 |   opacity: interpolate(animatedIndex.value, [-1, disappearsOnIndex, appearsOnIndex], [0, 0, opacity], Extrapolate.CLAMP),
> 4 |   flex: 1
    |       ^
  5 | }
  6 | )

Just by importing the <BottomSheet> component.

Environment info

Library Version
@gorhom/bottom-sheet 4.1.3
react-native 0.63.3
react-native-reanimated 2.3.0-beta.2
react-native-gesture-handler 1.10.3
// babel.config.js
module.exports = {
  compact: false, // Prevent "The code generator has deoptimised the styling of..."
  presets: ["module:metro-react-native-babel-preset"],
  plugins: [
    [
      "module-resolver",
      {
        root: ["./src"],
        extensions: [".ios.js", ".android.js", ".js", ".ts", ".tsx", ".json"],
        alias: {
          "@components": "./src/components",
          hooks: "./src/hooks",
          stores: "./src/stores",
        },
      },
    ],
    "react-native-reanimated/plugin",
  ],
}
github-actions[bot] commented 3 years ago

@pke: hello! :wave:

This issue is being automatically closed because it does not follow the issue template.

gabrielbuzziv commented 2 years ago

same problem

pke commented 2 years ago

It seems you need to file another issue here that "follows the issue template" ;) @gabrielbuzziv

ivan-mumtak commented 2 years ago

someone figured out how to fix it?

codeyogi911 commented 2 years ago

did someone find a solution?

philip-withpara commented 2 years ago

this works for me https://github.com/software-mansion/react-native-reanimated/issues/1090#issuecomment-696322100