Skip to content

Best way to support react-native? #162

Answered by ChristianMurphy
bi3ri asked this question in Q&A
Discussion options

You must be logged in to vote

Welcome @bi3ri! 👋

As with so many things in Engineering "best" and "easiest" are very relative to what your goal is. 😉 🙂

For easiest, as in least code to maintain, you could leverage the existing rehype ecosystem, and add an HTML to react-native translator on the tail end.
There are some existing solutions like https://meliorence.github.io/react-native-render-html/ which can take HTML text and render it in react-native.

If you want to avoid serializing to text before rendering.
I'd recommend leaning on https://github.com/rehypejs/rehype-react (a thing wrapper around https://github.com/syntax-tree/hast-util-to-jsx-runtime).
Rather than focusing on how to render, focus on how to adjust/rewo…

Replies: 1 comment 13 replies

Comment options

You must be logged in to vote
13 replies
@wooorm
Comment options

@bi3ri
Comment options

@wooorm
Comment options

@bi3ri
Comment options

@wooorm
Comment options

Answer selected by ChristianMurphy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants