Closed szulima closed 4 years ago
Sorry I missed this. The code needs to be a string, e.g.:
const code = `
import React, { Component, } from 'react';
import { AppRegistry, Text, } from 'react-native';
const App = () => <Text>Hello World</Text>;
AppRegistry.registerComponent('App', () => App);
`
export default () => (
<WebPlayer
style={{width: 800, height: 500}}
code={code}
/>
)
Hey guys, I learn coding, want to use your tool and have silly question, can you please help me? Trying to embed React Native code inside of WebPlayer component (in React app) like that:
I guess I don't know how to format code inside "code" parameter? Can you take a look?