Rich Text library for react native

Prismic provides Rich Text component for React development (https://www.npmjs.com/package/prismic-reactjs). However, is it also available for React Native? I can’t find any relevant information about that. If not, is there anything I can use for rendering rich text with links, bold text, etc. within the app?

You could try passing the output to https://github.com/archriss/react-native-render-html, after consolidating everything into a single html string.

Hi @barbara.rekowska, unfortunately we don’t provide any kits or resources for React Native at the moment. Sorry for the inconvenience. I haven’t tried the library that @osama.aamer95 has linked to, but it seems promising. Let us know if you give it a try and if it worked for you. I would also love to hear if you have any tips or tricks for anyone in the future who wants to use React Native.

Hi @levi!
I am looking for such a lib to parse Prismic RichText to React Native.
I planned to develop it in the next days. Could it be interesintg for the Primic team to share my work with you? What do you prefer : a fork of prismic-reacjjs, or a new lib prismic-react-native ?

Hi @guillaume.piedigross,

For React native, I suggest you to create a new project that would look basically like prismic-reactjs.
The React kit relies on prismic-richtext that you can find here: https://github.com/prismicio/prismic-richtext
This will basically parse any richtext field and convert it as generic tree that you can easily serialized, as React Native component for instance.
For the query part, the kit prismic-javascript has been developed with React Native in mind so it should be totally compatible so you don’t have to care about that.
Hope it gives you some answers, don’t hesitate to reach out to me if you need any help :wink:

1 Like