Skip to content

Create state management POC#1

Open
emanuelmustea wants to merge 4 commits into
masterfrom
add-state-management
Open

Create state management POC#1
emanuelmustea wants to merge 4 commits into
masterfrom
add-state-management

Conversation

@emanuelmustea
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread src/state/Context.tsx Outdated
Comment thread src/state/Context.tsx Outdated



const initialContext: { state: State; dispatch: React.Dispatch<UserActions> } = {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UserActions should not be there

Comment thread src/state/Reducer.ts
import { UserReducer } from "./user/UserReducer";
import { State } from "./State";

export const combineReducers = <T>(reducers: {[P in keyof T]: any}) => {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified redux implementation of combineReducers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant