mardi 24 septembre 2019

Modifying React Native to use other platforms

I want to use React-Native to code for the web, but I cannot seem to find the UI View code that goes into Yoga. If I could find the Yoga input, I feel like I could separate out that part of the code base and use it to generate the page using Yoga directly in the browser and then I would have to load in the other parts like VirtualizedList and FlatList, but most of those already have browser equivalents and the implementation would be fairly trivial, although some props might not be supported. I might also look into using web components and custom element tags. But I can't seem to find the entry points and important parts of the render code. I know I can do this directly in HTML, but the idea of writing responsive interfaces using React Native and applying them to large screen tablets, as well as desktop web interfaces, and even desktop apps, is definitely compelling.

I've already seen react-native-web, but it seems like it handles things a little differently. I don't want to reinvent the wheel, I just want to swap out the spokes. I don't want to write another react native. I want to use the existing react native and only modify the parts that apply specifically to this, which does of course mean that a lot of code in the repo will be unused since there's a ton of native code there. But it seems that most of the Javascript code would still be used.




Aucun commentaire:

Enregistrer un commentaire