Using SASS in React Native - 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!

Related

Nativewind reuseable component library in multiple projects

I would like to create a repo for a Library for UI Components thats reusable in multiple react native projects. I want to use NativeWind (tailwind for react native)
Can anyone give me any tips on how I would go about doing this? I have tried setting up a library with nativewind installed.
But when I create a component styled using nativewind, then try to run an example of using said component it doesn't show any of the styling.
I used react-native-builder-bob for boilerplate library.

React Native syntax highlighting

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

Is there an easy way to use BlueprintJS Icons in React Native?

I want to use these icons:
https://blueprintjs.com/docs/#icons
In my react native project. Wondering if there is an easy solution.
It appears that icons as CSS are legacy as of Blueprint 2.0. You can do it, but I'm not sure how it will work.
You can read more about it here here.

How to check if a point lies on polyline in react native

I am not able to use google.maps.geometry.poly.isLocationOnEdge() in my react native project. Is there any other way to check whether a point lies on a route which I can use to react native?
I recently came across this problem while using react-native-maps.
You can use isPointInLine(point, lineStart, lineEnd) method by using geolib JS package. This package has many other useful methods.

Using React Native to run JavaScript code from an existing native app without having to display a component

The official documentation for React Native explains how to add React Native views to existing native applications. However, it does not explain how to run React Native code written in JavaScript from a native application, without having to display any React Native component. Does the framework provide a way to do this?
I think reason being, R-N works on top of Native components and not other way round. I have not come across anything that you are looking.