Closed ghost closed 4 years ago
react-jsx-parser works on RN. You just need to set the renderInWrapper
prop to false
.
sorry does not work for me with or without renderInWrapper={false}
Maybe it's the version I was using.
How about if you use "react-jsx-parser": "1.16.1"
?
I am using latest
version, and this is the string I am going to parse it.
const strJSX = "<Text onPress={()=> alert('Hi I am parsed')} style={{color: 'red', lineHeight: '40', borderRadius: 20, margin: 5, padding: 5, fontWeight: 'bold'}}>Hi dear this is a jsx string</Text>";
Could you please test the above string and parse it to react-native
jsx?
Sorry, but this doesn't seem to be an issue. For questions and discussions, please use StackOverflow or https://discuss.ternjs.net/c/acorn.
@RReverser thank you
I am strongly need a package to convert
String
intoJSX
, is this package works forreact-native
too?