I recently purchased a React Native template and looking through the code, I saw something curious.
In their screens
folder, they have a package.json
file with this content:
{
"name": "@screens"
}
and that was being used to import the screens, like:
import SomeScreen from '@screens/some'
And that's awesome! I didn't know I could do that. I tested it and it worked perfectly. Now I'm trying to find that feature on the internet but I can't find anything about it, the only possible name I can think of for this is "Directory reference" and I got no results.
Did you know about this? How can I look for it?
Thanks in advance!
Top comments (0)