question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

is this a RNW ready? Can I use this for both web and mobile?

See original GitHub issue

Is your feature request related to a problem? Please describe. Yes, I am wondering if this is react native web enabled by default? is it currently RNW capable. I am super curious. Is there an example of this?

Describe the solution you’d like First, The current implementation is amazing, kudos to the team 👏 . On my end, I am trying to get this awesome picker running with storybook, meaning I am setting up a component based approach to enable re-usability across devices including web. 😄

Secondly, do we need the icons as a dependency? Ref: https://github.com/hossein-zare/react-native-dropdown-picker/blob/4.x/src/index.js#L17 It would be amazing if we just have it as a prop and have the users determine their own icons to send in 💯 and possibly remove vector icons dependency? 😛

Describe alternatives you’ve considered I would say this is currently the best option for me, but currently I am not sure if this is RNW ready. Inspiration comes from necolas https://necolas.github.io/react-native-web/docs/picker/

I am currently facing this error with my storybook:

ERROR in /node_modules/react-native-vector-icons/lib/create-icon-set.js 43:21
Module parse failed: Unexpected token (43:21)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| 
|   class Icon extends PureComponent {
>     static propTypes = {
|       allowFontScaling: PropTypes.bool,
|       name: IconNamePropType,
 @ /node_modules/react-native-vector-icons/Feather.js 6:0-50 9:16-29
 @ ./dist/killer-shrew.esm.js
 @ ./stories/controller.stories.tsx
 @ ./stories sync \.stories\.(js|ts)x?$
 @ ./.storybook/config.tsx
 @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.tsx (webpack)-hot-middleware/client.js?reload=true&quiet=true

ERROR in /node_modules/react-native-dropdown-picker/src/index.js 61:33
Module parse failed: Unexpected token (61:33)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|                 isVisible: props.isVisible
|             },
>             initialScroll: props?.autoScrollToDefaultValue,
|             defaultValueIndex
|         };
 @ ./dist/killer-shrew.esm.js 17:0-58 7785:66-80
 @ ./stories/controller.stories.tsx
 @ ./stories sync \.stories\.(js|ts)x?$
 @ ./.storybook/config.tsx
 @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.tsx (webpack)-hot-middleware/client.js?reload=true&quiet=true

FYI: I can get the setup to run if I comment out Feather Icons import and send in my custom Icon, but this is not effective because I’ll need to get updates from this package 😄

import Feather from 'react-native-vector-icons/Feather';
Feather.loadFont();

any thoughts, examples or pointers to getting this in place will be welcomed. Thanks 👍

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
hossein-zarecommented, Mar 16, 2021

Hello, Thank you for your kind comment.

It may take a week to get rid of the dependency. Please modify the package to make it work for now, The release of the standalone version will be announced soon.

0reactions
mikehardycommented, May 18, 2022

I am using it on the web and I have noticed similar behavior with modal mode - I haven’t tracked it down yet personally

Read more comments on GitHub >

github_iconTop Results From Across the Web

jkoutavas/add-rnw-to-rn-typescript-app: Following along ...
Which tells webpack to use App.tsx for both web and mobile. Now when you run on mobile, you'll see the same UI come...
Read more >
The complete guide to React Native for Web
Yes ! With React Native for Web, developers can write a single React Native application that can run natively on Android and iOS,...
Read more >
The State of React Native for Web, Windows, and macOS ...
React Native is a cross-platform development framework that supports simultaneous iOS, Android, web, macOS, and Windows development from a ...
Read more >
React Devs, Why don't you use React Native for Web?
As a React dev, I use ReactDOM everyday and RN is fun but I've never considered React Native for Web. Tagged with react,...
Read more >
Cross-Platform Apps vs Native Apps vs Progressive Web ...
All you need to do is to run a browser – no matter which is that. PWAs also work for any kind of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found