Make It Your Own
File Structures
.expo
.expo-shared
package-lock.json
package.json
tsconfig.json #typescript config file
babel.config.js
.prettierrc.js # has all code editor formatting
.eslintrc.js # manage and enforce code patterns & styling
app.json
App.tsx # App container
├── api
│ └── index.tsx #contains get/fetch api calls
├── assets
│ ├── coinbase.png # Rocket icon for Home Screen
│ ├── icon.png # coinbase icon
│ └── splash.png # coinbase splash screen background
├── components # all components are dumb - have no logic
│ ├── About.tsx # renders general info about each coin
│ ├── AssetItem.tsx # Contains Calendar Range Input
│ ├── AssetList.tsx # Contains all Check Boxes
│ ├── Chart.tsx # renders all chart info
│ ├── CoinHeader.tsx # coin screen header component
│ ├── CoinInfo.tsx # renders chart, and coin related info
│ ├── CoinList.tsx # renders the favourites/following list
│ ├── CoinListItem.tsx # renders the item of coinlist
│ ├── index.tsx # export all components for easier import
│ ├── Invest.tsx # renders the buy/sell and amount entry
│ ├── Main.tsx # renders fav, news and other components
│ ├── MarketStats.tsx # renders the market cap, volume & supply
│ ├── News.tsx # renders the top 5 news items list
│ ├── NewsListItem.tsx # renders news/story item
│ ├── Range.tsx # renders the chart range 1H, 1D, 1W ...etc
│ ├── Spinner.tsx # renders a generic loading spinner
│ ├── StoriesList.tsx # renders stories list in the stories screen
│ ├── Switcher.tsx # renders the list of ranges [1H, 1D, 1W ..]
│ ├── TabBarIcon.tsx # renders the tab bar icon
│ └── WalletListItem.tsx # renders wallet list item
├── enums
│ └── index.tsx # holds static variables/list using enum
├── navigation
│ ├── Navigator.tsx # wrapper to create switch navigator
│ └── Tabs.tsx # create all stack navigations
├── screens
│ ├── Account.tsx # Wallets/Account container
│ ├── Assets.tsx # Assets/Coins container
│ ├── Coin.tsx # Coin details container
│ ├── Home.tsx # Home screen container
│ ├── Invite.tsx # invite and share screen
│ └── Stories.tsx # Stories/News container
├── store
│ ├── actions.tsx # actions to dispatch data to the store
│ ├── index.tsx # state management wrapper
│ ├── reducers.tsx # returns all the state changes
│ └── types.tsx # holds all the interfaces and types of dataChange Theme Colors
Change Api Key
Change Fonts, App Icon and Splash
don't remove Roboto_medium if you didn't customize the fontFamily in all your components because that would make native-base components break on android as it's using Roboto_medium as a default fontFamily.
Code Styling and Formatting
Go to .prettierrc.js in the root of the app folder and change the formatting of your choice. You can learn more here https://prettier.io/docs/en/configuration.html
our default config is here:
To enforce the rules and keep consistency of code styling of all your *.ts and *.tsx files, you can go to .eslintrc.js . Whether you are working solo or in a team, this configuration is very useful and will keep your code consistent and clean. To learn more please visit https://eslint.org/docs/user-guide/getting-started
To make the formatting works better for you, you would have to add configuration to you code editor’s settings to allow Prettier to auto format the code whenever any typescript or js file is saved (formatOnSave). Please refer to Prettier Editor Integration docs to configure your editor.
For VSCode, install the extensions for ESLint and Prettier. Below are the popular extensions:

Go to VSCode User settings to auto fix eslint formatting issues on file save like so:
Last updated
Was this helpful?