Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Commit 8b9aa68

Browse files
samchamberlandsatya164
authored andcommitted
docs: add development workflow to readme (#205)
1 parent 08a6268 commit 8b9aa68

File tree

2 files changed

+42
-14
lines changed

2 files changed

+42
-14
lines changed

README.md

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,48 @@ You can install another package, [`react-navigation-material-bottom-tabs`](https
3737
```js
3838
import { createMaterialBottomTabNavigator } from 'react-navigation-material-bottom-tabs';
3939

40-
export default createMaterialBottomTabNavigator({
41-
Album: { screen: Album },
42-
Library: { screen: Library },
43-
History: { screen: History },
44-
Cart: { screen: Cart },
45-
}, {
46-
initialRouteName: 'Album',
47-
activeTintColor: '#F44336',
48-
});
40+
export default createMaterialBottomTabNavigator(
41+
{
42+
Album: { screen: Album },
43+
Library: { screen: Library },
44+
History: { screen: History },
45+
Cart: { screen: Cart },
46+
},
47+
{
48+
initialRouteName: 'Album',
49+
activeTintColor: '#F44336',
50+
},
51+
);
52+
```
53+
54+
## Development workflow
55+
56+
To setup the development environment, open a Terminal in the repo directory and run the following:
57+
58+
```sh
59+
yarn bootstrap
60+
```
61+
62+
While developing, you can run the example app with [Expo](https://expo.io/) to test your changes:
63+
64+
```sh
65+
yarn example start
66+
```
67+
68+
Make sure your code passes TypeScript and ESLint. Run the following to verify:
69+
70+
```sh
71+
yarn typescript
72+
yarn lint
73+
```
74+
75+
To fix formatting errors, run the following:
76+
77+
```sh
78+
yarn lint --fix
4979
```
5080

51-
## Documentation
81+
## Docs
5282

5383
- [`createBottomTabNavigator`](https://reactnavigation.org/docs/en/bottom-tab-navigator.html)
5484
- [`createMaterialTopTabNavigator`](https://reactnavigation.org/docs/en/material-top-tab-navigator.html)

example/App.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from 'react';
2-
import { registerRootComponent } from 'expo';
32
import { View, TouchableOpacity, StyleSheet } from 'react-native';
43
import {
54
Assets as StackAssets,
@@ -22,7 +21,7 @@ import MaterialTopTabs from './src/MaterialTopTabs';
2221
Asset.loadAsync(StackAssets);
2322

2423
const Home = (props: NavigationStackScreenProps) => {
25-
let theme = useTheme();
24+
const theme = useTheme();
2625

2726
return (
2827
<View>
@@ -131,5 +130,4 @@ const styles = {
131130
},
132131
};
133132

134-
// @ts-ignore
135-
registerRootComponent(App);
133+
export default App;

0 commit comments

Comments
 (0)