Is it possible to import a style from another directory in the import of react native?
I tried something similar to what is done in require to change the directory with "../" but without success.
Is it possible to import a style from another directory in the import of react native?
I tried something similar to what is done in require to change the directory with "../" but without success.
It can be done like this:
import '../style/style.css'; // ou
import '../style/style.js';
where the two points means to exit the current directory and fall into the root and then enter the path of the other directory and the name of the css.
If you have multiple directories inside one another, you have to exit with ..
until you get to src
, example if it is 3 directory: ../../../
If you want a hint of editor use Visual Studio Code , it plays the role of completing.