Skip to content

Commit 2a9ffa0

Browse files
committed
Made some refactors and updated README file
1 parent 90be65e commit 2a9ffa0

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ The app works this way:
2323

2424
- #### adding-redux:
2525
In this branch we add `redux`, `redux-recompose` and `react-redux` to our newly created React Native (Typescript) project. In this branch the app implements a basic counter that increase/decrease based on two buttons that dispatch a basic action to Redux and updates the counter.
26+
- #### module-resolver:
27+
In this branch we add `babel-plugin-module-resolver` to the project and update the settings and the `import` notation in source files.
2628
- #### redux-reactotron:
2729
In this branch we install and configure `Reactotron` to monitor the _Redux_ state and log info from the app.
2830
- #### redux-persistence:

src/app/components/CustomButton/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import {
77
ImageStyle,
88
PressableStateCallbackType,
99
} from 'react-native';
10+
import {primary, primaryHighLight} from '@constants/colors';
1011

1112
import styles from './styles';
12-
import {primary, primaryHighLight} from '../../constants/colors';
1313

1414
interface Props {
1515
style?: ViewStyle;

src/app/styles.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {StyleSheet} from 'react-native';
2-
3-
import {primary} from './constants/colors';
2+
import {primary} from '@constants/colors';
43

54
export default StyleSheet.create({
65
safearea: {

src/redux/counter/actions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {createTypes} from 'redux-recompose';
2-
import {Action} from '../../interfaces/reduxInterfaces';
2+
import {Action} from '@interfaces/reduxInterfaces';
33

44
export const actions = createTypes(['UPDATE_COUNTER'], '@@COUNTER');
55

src/redux/counter/reducer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {createReducer} from 'redux-recompose';
2-
import {CounterState, Action, State} from '../../interfaces/reduxInterfaces';
2+
import {CounterState, Action, State} from '@interfaces/reduxInterfaces';
33

44
import {actions} from './actions';
55

src/redux/store.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {createStore, combineReducers} from 'redux';
2-
import {State} from '../interfaces/reduxInterfaces';
2+
import {State} from '@interfaces/reduxInterfaces';
3+
34
import counter from './counter/reducer';
45

56
const reducers = combineReducers<State>({

0 commit comments

Comments
 (0)