Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ReactRedux 6 #30

Merged
merged 25 commits into from Dec 29, 2018
Merged

Support ReactRedux 6 #30

merged 25 commits into from Dec 29, 2018

Conversation

abettadapur
Copy link
Collaborator

@abettadapur abettadapur commented Nov 11, 2018

#27

const store: IModuleStore<any> = context.store;
if (!store) {
throw new Error("Could not load store from React context.");
if (!ReactReduxContext) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if (!ReactReduxContext && !context.store) {
    throw new Error("Could not load store from React context.");
}

<ReactReduxContext.Consumer>
{(context) => (
<DynamicModuleLoaderImpl
store={context.store}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to assert here that context.store is not null?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, thanks

@@ -6,11 +6,16 @@ import {
IDynamicallyAddedModule
} from "./Contracts";

// @ts-ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this @ts-ignore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Needed, because the context is not used

@abettadapur abettadapur changed the title [DRAFT] Support ReactRedux v6 Support ReactRedux 6 Dec 20, 2018
@abettadapur
Copy link
Collaborator Author

@navneet-g Can you review this once more?

lerna.json Outdated
@@ -2,5 +2,6 @@
"packages": [
"packages/*"
],
"hoist": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this?

/** Modules that need to be dynamically registerd */
modules: IModule<any>[];

store: IModuleStore<any>;
Copy link
Contributor

Choose a reason for hiding this comment

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

store?: IModuleStore<any>;

To explicity state that store can be undefined.

@abettadapur abettadapur merged commit 3468b5a into master Dec 29, 2018
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.

None yet

2 participants