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.

Make the plugin compatible with `react-native-web`?

See original GitHub issue

Is this a bug report, a feature request, or a question?

A QUESTION

Have you followed the required steps before opening a bug report?

(Check the step you’ve followed - replace the space character between the square brackets ([]) by an x.)

Have you made sure that it wasn’t a React Native bug?

yep, on ios it is very good.

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

not test on Android. i want to use this lib on web app.

Is the bug reproductible in a production environment (not a debug one)?

yep, just copy the example to a react-native-web project, you can create a new one by https://github.com/VISI-ONE/create-react-native-web-app

Environment

Environment: “react”: “16.3.1”, “react-native”: “0.55.4”, “react-native-web”: “0.8.4”, “react-native-snap-carousel”: “^3.7.2”,

Target Platform: Chrome (68.0.3440.106)

Expected Behavior

onSnapToItem not working, so it cannot loop

Actual Behavior

(Write what happened. Add screencasts/screenshots!)

Reproducible Demo

(Paste the link to a Snack example in which the issue can be reproduced. Please follow the guidelines for providing a Minimal, Complete, and Verifiable example.)

navigator

Steps to Reproduce

(Write your steps so that anyone can reproduce the issue in the Snack demo you provided.)

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:28
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
justindi15commented, Sep 21, 2020

@kopax found this and it seems to be working for me https://www.npmjs.com/package/react-native-web-swiper

6reactions
kristerkaricommented, Dec 24, 2018

I contributed some code to react-native-web that might make it a bit easier to make this library compatible with Web.

The first one is a fix to ScrollView’s smooth scrolling, fixing a bug and making it possible to polyfill smooth scrolling for browsers that do not support it: https://github.com/necolas/react-native-web/commit/30d7c31b65ef86d5047f51c6195f464f726f6357

The second one is to add support for for ScrollView’s pagingEnabled property using CSS Scroll Snap. Looking at the code it seems to me that this library is not using the pagingEnabled prop, but it is possible to do a similar code change inside this library: https://github.com/necolas/react-native-web/commit/1e202b6bd5e2da6dde6834c808dd47f82691c7ce

As already mentioned in this thread, the big missing feature is the support for the scroll end events of ScrollView. There is however an idea of how to implement it: https://github.com/necolas/react-native-web/issues/1021#issuecomment-447987944

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi-platform setup // React Native for Web
How to integrate React Native for Web into an existing React Native codebase. Please read the setup guide first. If you have an...
Read more >
The complete guide to React Native for Web - LogRocket Blog
Create React App is the standard way to bootstrap web-only React applications. Although it comes with built-in support for aliasing react-native ...
Read more >
Custom React Native / React web plugins | Voters
Make it possible to add a custom React Native / React web plugin via a GitHub repository, so that the plugin also tells...
Read more >
How to add React Native Web to an existing ... - Aryan Goharzad
React Native for Web allows you to make your React Native application available for your users through the web.
Read more >
gatsby-plugin-react-native-web
Gatsby plugin for react-native-web NPM Build Status Adds React-Native-Web and Expo support to Gatsby. This means you can use components from…
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