React-native-fast-image: Support react-native-web.

Created on 3 Apr 2019  路  3Comments  路  Source: DylanVann/react-native-fast-image

I would love to see support for react-native-web

feature

Most helpful comment

All 3 comments

Are you looking for the FastImage functionality on web? Or are you just trying to get your react-native-fast-image code working cross-platform?

With respect to the later, I'm exploring the possibility of using a babel plugin to rewrite all imports of the native Image component to use FastImage instead. You could conditionally use such a plugin only on native, then use the standard Image component throughout your code.

The latter. Cross platform working. I'll trust the browser to deal with the performance.

You might actually get away with just deploying the default RN Image component for the web version and let react-native-web take care of the rest. Or just look at how they wrote the Image web version and copy that.

Right now, I just create an Image.web.js version and use native RN Image there. That works fine.

Was this page helpful?
0 / 5 - 0 ratings