Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the
App
namespace instead of relative imports
Adding a `package.json` to the `App` directory allows us to import using the `App` namespace instead of relative paths like `../Containers/Foo`. Relative paths can break when refactoring which is why we prefer absolute paths.
- Loading branch information
Matthieu Napoli
committed
Jul 9, 2018
1 parent
27c9f7a
commit f4de674
Showing
3 changed files
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "App" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { AppRegistry } from 'react-native' | ||
import App from './App/App' | ||
import App from 'App/App' | ||
|
||
AppRegistry.registerComponent('Boilerplate', () => App) |