React Native syntax highlighting - react-native

I want to use syntax highlighting of code for my React Native app, but i can not find it. I have found syntax highlighting of code only for react, but not for React Native.
I want to find smt like this:
Let's say that i have html code that i want to highlight, how i can do this, without using render-html.
If you did not understand, this is syntax highlighting: https://pinetools.com/syntax-highlighter
And i need to have it for React Native. Is there any npm or yarn packages for this?
Help me please

Maybe react-native-syntax-highlighter?
GitHub link:
https://github.com/conorhastings/react-native-syntax-highlighter

Related

Using SASS in React Native

I'm trying to find a way to implement SASS in my react native project. All I found is this package react-native-sass-transformer, but it doesn't seem to work on my end. Tried looking for other way but all I see is approach in React instead. Does anyone know another way into implementing SASS in a react native cli project? Thank you!
I bet you're trying to use react native sass transformer with .tsx (typescript implementation), if it's the case, you just need to :
//#ts-ignore
import styles from './app.scss';
And then it should work.
You can also use: https://github.com/kristerkari/react-native-typed-sass-transformer to handle types (I didn't tried yet, but I'll !)
Good luck!

Something I can use with React Native for web

I like React Native's some features like Flatlist, Modal, Animation. I wanted to develop for web with React Native or Expo. I use react navigation but have 404 errors in refresh pages. I also want When user put www.mywebsite.com/post/postid, it will go directly into postid's page. I tried react-router-dom with HashBrowser. Not great! I kind of want something better than hash browser. What can I use? Any advice please.
I use also react-native-web and react-navigation. If you want the react-navigation to work with the links correct, you must set up the config object like the documentantion
If you don't set up correctly the config object, react-navigation doesn't throw errors in your console, but it doesn't work right!
The question was before 3 months, but I hope this answer helps someone, with the same problem!

Nooby question for a splash screen in React Native

Trying to make a splash screen for my react native app using this guide: https://medium.com/#appstud/add-a-splash-screen-to-a-react-native-app-810492e773f9
Trying to type this code in: Code image
and I'm getting errors. Could someone please explain what the "create:" and "inputs:" mean and why they're grayed out?
Thanks
They are the explanation of the code parts. You put the inputs where it says inputs. Create is the block that you put your code that you want effect to trigger. You can read the documentation about the react hooks so you will have a better grasp before you try to jump into using them; React hooks

Navigator issue in App.js file -- React Native

When i am trying to configure components with AppNavigator getting parsing error semicolon missing.
React Native Navigation-V3.11.1
But i have checked, i did everything correct as per my vision.
Please give me the solution for this.
Thanks in advance..!
Create a . jshintrc in the root and write the code below in it:
"asi" : true

ToastAndroid showWithGravity Error

Following the document, I am including a toast in my projects:
import {ToastAndroid} from react-native
ToastAndroid.showWithGravity('A toast with gravity',ToastAndroid.SHORT,ToastAndroid.TOP);
But I got an error:
However, if I replace it with another function, it works:
ToastAndroid.show('A toast without gravity',ToastAndroid.SHORT);
I am using React Native 0.30.0
Is it a bug or I made the wrong way to use it.
ToastAndroid.showWithGravity(...) was implemented in ReactNative 0.31.0, upgrade your RN version.
First implemented here: v0.31.0-stable branch.