Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import component in react native past two folders?

Whenever I try to import a component that is two or more folders back I get an issue. Using ../Folder works fine, but if I try to use .../Folder I get a module error. How do I get through the directory?

like image 762
drewvy22 Avatar asked Jun 20 '17 02:06

drewvy22


People also ask

Do I need to import React in all files?

You no longer need to import React from "react" . Starting from the release 17 of React, JSX is automatically transformed without using React. createElement . However, other exports like hooks must be imported.


1 Answers

Use ../.. to go up two directories.

like image 178
SoZettaSho Avatar answered Nov 01 '22 14:11

SoZettaSho