React-native-tab-view: will web platform be added?

Created on 6 Mar 2017  Â·  13Comments  Â·  Source: satya164/react-native-tab-view

Hey,

I think that there is no much to add in order for the web platform to be added, but styles and strip flow off on prepublish.

will you consider adding it or accept PRs?

Most helpful comment

All 13 comments

Surprised it works on the web without modification. Have you tried it? Do you have a demo?

yes! that is awesome.
The pager that works fine is TabViewPagerPan.

ehlef8
j5y6yj

Probably it is better to have a repo to test it but in the meantime here goes some comments.

Scroll style in TabBar works better auto than scroll. ( prevent scrolling below. )

screenshot from 2017-03-06 17-36-37

Also found that width offset should be recalculated when browser resizes ( not sure how it works when device orientation change ).

well that is all, hope this helps @satya164

That's exciting! Let's add a prepublish script for web as the first step. Regarding overflow, it didn't work without scroll in native apps, so we'll need to check that.

yes it is!
I have just created https://github.com/agrcrobles/react-native-tab-view-web and moved some examples there.
There is need to include node_modules folder in webpack.config

@satya164 yes this prepublish would help a lot. If there was a dist/ (or web/, ...) folder ES5 compliant we wouldn't have to eject from create-react-app :)

Yeah, please send a PR adding the script and I'll review.

Closing for now, could be re-opened when another PR will be submitted.

Closed #159.

so I found react-native-web has implemented babel-plugin-transform-react-remove-prop-types and therefore no propTypes in a production environment ( __DEV__: false by webpack.DefinePlugin ) so my web app crashes when TouchableItem, TabBar or TabViewTransitioner try to compose/extend their props from View or Text.

Not sure which is the best solution for that, In the meantime I have forked and removed those props as a workaround.

@agrcrobles shouldn't the plugin also remove the proptypes from react-native-tab-view?

edit: oh, you're not using the plugin, probably you will need to use the plugin then

This doesn't seem to work anymore, at least with create-react-native-web-app.

2.0.3 not support web,
some error cause by react-native-reanimated

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chen504554911 picture chen504554911  Â·  3Comments

AndriiUhryn picture AndriiUhryn  Â·  3Comments

satya164 picture satya164  Â·  3Comments

karthikeyansundaram2 picture karthikeyansundaram2  Â·  3Comments

compojoom picture compojoom  Â·  4Comments