jondot / awesome-react-native

Awesome React Native components, news, tools, and learning material!
http://www.awesome-react-native.com
34.71k stars 4k forks source link

Is there a string renderer for react native? #1103

Open radiorz opened 2 years ago

radiorz commented 2 years ago

such as this:

import templateRedenderFunc  from './???'
export default Renderer(template=''){
  return templateRedenderFunc (template)
}

using

const template = `<Text>1234</Text>`
function App(){
return <Renderer template={template}></Renderer>

}
radiorz commented 2 years ago

I only know that react-native-render-html could help for rendering string html template

leandrosimoes commented 2 years ago

Maybe this is what are you looking for:

https://www.npmjs.com/package/acorn-jsx https://www.npmjs.com/package/react-jsx-parser