docs: add development workflow to readme (#205)

This commit is contained in:
Samuel Chamberland
2019-10-31 17:16:29 -04:00
parent 4b940481e3
commit 60df6fc644
2 changed files with 42 additions and 14 deletions

View File

@@ -37,18 +37,48 @@ You can install another package, [`react-navigation-material-bottom-tabs`](https
```js
import { createMaterialBottomTabNavigator } from 'react-navigation-material-bottom-tabs';
export default createMaterialBottomTabNavigator({
Album: { screen: Album },
Library: { screen: Library },
History: { screen: History },
Cart: { screen: Cart },
}, {
initialRouteName: 'Album',
activeTintColor: '#F44336',
});
export default createMaterialBottomTabNavigator(
{
Album: { screen: Album },
Library: { screen: Library },
History: { screen: History },
Cart: { screen: Cart },
},
{
initialRouteName: 'Album',
activeTintColor: '#F44336',
},
);
```
## Documentation
## Development workflow
To setup the development environment, open a Terminal in the repo directory and run the following:
```sh
yarn bootstrap
```
While developing, you can run the example app with [Expo](https://expo.io/) to test your changes:
```sh
yarn example start
```
Make sure your code passes TypeScript and ESLint. Run the following to verify:
```sh
yarn typescript
yarn lint
```
To fix formatting errors, run the following:
```sh
yarn lint --fix
```
## Docs
- [`createBottomTabNavigator`](https://reactnavigation.org/docs/en/bottom-tab-navigator.html)
- [`createMaterialTopTabNavigator`](https://reactnavigation.org/docs/en/material-top-tab-navigator.html)

View File

@@ -1,5 +1,4 @@
import * as React from 'react';
import { registerRootComponent } from 'expo';
import { View, TouchableOpacity, StyleSheet } from 'react-native';
import {
Assets as StackAssets,
@@ -22,7 +21,7 @@ import MaterialTopTabs from './src/MaterialTopTabs';
Asset.loadAsync(StackAssets);
const Home = (props: NavigationStackScreenProps) => {
let theme = useTheme();
const theme = useTheme();
return (
<View>
@@ -131,5 +130,4 @@ const styles = {
},
};
// @ts-ignore
registerRootComponent(App);
export default App;