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
Conversation
…o abettadapur/react-redux-6
const store: IModuleStore<any> = context.store; | ||
if (!store) { | ||
throw new Error("Could not load store from React context."); | ||
if (!ReactReduxContext) { |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
@navneet-g Can you review this once more? |
lerna.json
Outdated
@@ -2,5 +2,6 @@ | |||
"packages": [ | |||
"packages/*" | |||
], | |||
"hoist": true, |
There was a problem hiding this comment.
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>; |
There was a problem hiding this comment.
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.
#27