DEV Community

Discussion on: Step 2: Setting up React with React-Native-Web

Collapse
 
se22as profile image
se22as

Thank you for this blog, its excellent.

Have you managed to get react-navigation working in such an app. I followed this blog and I can run the app on both Android and Web. As soon as i add in react-navigation it all breaks and the web does not run. I get the following error

Swipeable.js:1 Uncaught Error: Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: C:\0_LEARNING\Headless_Apps\ReactNativeWeb\plainApp\plainapp\node_modules\react-native-gesture-handler\Swipeable.js: Missing class properties transform.

if i add the following in the webpack.config.js under options
plugins: ['@babel/plugin-proposal-class-properties'],

I then get the following error

Directions.js:1 Uncaught TypeError: Cannot read property 'Direction' of undefined
at eval (Directions.js:1)
at Object../node_modules/react-native-gesture-handler/Directions.js

Have you got any idea how to resolve this?