How to render react native based on the string?? (in this case string s) -
import react, { component } 'react'; import { appregistry, stylesheet, text, view } 'react-native'; export default class teststring extends component { render() { s = '' + '' + 'welcome react native!' + ''+ '' + 'to started, edit index.ios.js' + '' + ''; return ( {s} ); } } const styles = stylesheet.create({ container: { flex: 1, justifycontent: 'center', alignitems: 'center', backgroundcolor: '#f5fcff', }, welcome: { fontsize: 20, textalign: 'center', margin: 10, }, instructions: { textalign: 'center', color: '#333333', marginbottom: 5, }, }); appregistry.registercomponent('teststring', () => teststring);
Comments
Post a Comment