lelandrichardson / react-primitives

Primitive React Interfaces Across Targets
MIT License
3.09k stars 108 forks source link

What about scrollview? #70

Closed ahmedlhanafy closed 6 years ago

ahmedlhanafy commented 7 years ago

I feel like ScrollView is an essential part of these primitives, I can't remember any app that I built without it.

ekryski commented 7 years ago

My initial reaction was like "naaaaah"... but after sleeping on it I think you are right @ahmedlhanafy! It's not really possible to create a ScrollView or PanView with the current primitives.

For web it's really just a plain view with style props set for overflow visibility. For React Native you can't just use a View unfortunately.

Some time ago I created an abstraction where you could do <View scrollable></View> where under the covers if that prop was present it would render a React Native ScrollView. I think that same pattern could be applied here.

necolas commented 7 years ago

For web it's really just a plain view with style props set for overflow visibility

It's more than that: https://github.com/necolas/react-native-web/tree/master/src/components/ScrollView

ekryski commented 7 years ago

@necolas totally right. I have looked through all your source on the weekend. Didn't mean to trivialize. It's definitely not "just a view with styles" in order to have API compatibility. My bad... thanks for the correction.

dwicao commented 7 years ago

I created better primitives with support TextInput and FlatList Also, it's not use react-native-web package So you can use latest react v16+ and react-native v0.48+ Take a look the repo https://github.com/dwicao/react-universal-rendering

mathieudutour commented 6 years ago

see #54 for the discussion