interweave
interweave copied to clipboard
React JSX Support
Hello! I'm not entirely sure if this has been raised before or asked, or maybe this question might seem of a basic one, but I just want to ask if there's any support for React JSX elements. So far we are able to pass down HTML elements through content
prop, but I was wondering if we can pass down React JSX also. Wanting to parse react components also. Still currently new to the library.
@Lexpeee It's been years since I've worked on this, but it should be possible with transform
and messing with the configs. Here's the code: https://github.com/milesj/interweave/blob/master/packages/core/src/Parser.ts#L457
Cool! I'll give it a try
it should be possible with transform and messing with the configs.
@milesj JSX can contain JS code, so @Lexpeee may need https://github.com/TroyAlford/react-jsx-parser .