dabbott / javascript-playgrounds

An interactive JavaScript sandbox
https://unpkg.com/javascript-playgrounds/public/index.html
Other
1.4k stars 131 forks source link

Using the simualtor for Node Js #23

Closed peterjwlee closed 6 years ago

peterjwlee commented 7 years ago

Hello, I was reading the ReadMe and got pretty lost. I have react native components (.jsx and .js). I want to generate urls so I can put them in the iframes. I am a little lost in how to do this programmatically in node js. How do you generate the urls for each react native component file? Where do I json encode and URI encode the array files and where does that go? A little clarification would be awesome. Thank you.

dabbott commented 6 years ago

The encoded stuff goes after the hash in the URL that you use as the iframe's src, e.g. https://cdn.rawgit.com/dabbott/react-native-web-player/gh-v1.10.0/index.html#platform=android

It's a little complicated... maybe one day I'll make a simpler API