1

I am trying to create an application for programmers in React Native. I am very new to React-native, so only thing that I understood was to use <Text> instead of <span> and use <View> instead of <div> blah blah blah..

However, I want to include the actual code inside the React-Native app. I came across that I could not use <pre> nor <code> and instead I get the following error

Invariant Violation: View config getter callback for component `code` must be a function (received `undefined`). Make sure to start component names with a capital letter.

Help is needed. If there is a library that does this let me know also. Waiting for React-native experts!

D. K.
  • 41
  • 4
  • Please share the component where you're using the `code` or `pre` tags. – Jake Worth Sep 01 '21 at 13:18
  • Does this answer your question? [Render HTML in React Native](https://stackoverflow.com/questions/29334984/render-html-in-react-native) – ziishaned Sep 01 '21 at 13:28
  • 1
    @JakeWorth I do not have specific code yet but I want to use something like this in React ```return (
    {javascript code goes here}
    ) ``` to like this in React-Native ```return ({something goes here} )```
    – D. K. Sep 03 '21 at 04:39

0 Answers0