-
Notifications
You must be signed in to change notification settings - Fork 105
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
Ability to inject context... #37
Comments
We are using Antd UI and MobX store, Apollo Graphql for React. import Notification from 'rc-notification';
const renderNotification = Notification.prototype.render;
Notification.prototype.render = function() {
return (
<ApolloProvider client={apolloClient}>
<StoreProvider store={store}>
{renderNotification.call(this)}
</StoreProvider>
</ApolloProvider>
)
} By overriding Notification's render function, can access apollo or mobx in notification content. Rc-notification may provide an option to utilize React portal to retain root component's context.. |
Hmm... How about add feature like this:
related ant-design/ant-design#9036 |
Also looking for this functionality |
I need to utilize context in content of Notification.
Can i retain the root component's context while using this component?
The text was updated successfully, but these errors were encountered: