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

This package breaks Chakra-UI Toasts. #2

Closed
OmkarK45 opened this issue Oct 13, 2020 · 5 comments
Closed

This package breaks Chakra-UI Toasts. #2

OmkarK45 opened this issue Oct 13, 2020 · 5 comments

Comments

@OmkarK45
Copy link

Hey there,

I tried this package to render the markdown sent by the server, but apparently, it breaks the functionality of the native toast component in Chakra-UI.
Here's the error code.
can't perform a react state update on an unmounted component. this is a no-op, but it indicates a memory leak in your application. to fix, cancel all subscriptions and asynchronous tasks in the componentwillunmount method. ToastManager

You can check the above behavior here. Here .

@mustaphaturhan
Copy link
Owner

Hey @OmkarK45, thank you for your feedback.

I looked to your problem and you're right. There is something wrong with ToastManager when I import chakra-ui-markdown-renderer and I can see the problem even I don't use renderer in anywhere. I think the problem is related with library webpack configs so I will look it later.

I can suggest a workaround at the moment. Instead of this library, you can use this renderer directly from https://github.com/mustaphaturhan/chakra-ui-markdown-renderer/blob/master/src/index.js.

Just download raw file and use like a regular react component. Import from local files instead of chakra-ui-markdown-renderer while I look what causing the problem.

@OmkarK45
Copy link
Author

Thanks for the reply! :)

@OmkarK45
Copy link
Author

Update: It worked using the said method. Again, thanks!

@pjtf93
Copy link

pjtf93 commented Nov 2, 2020

Thank you for this @mustaphaturhan , it helped me a lot!

@mustaphaturhan
Copy link
Owner

Hey guys.

This issue fixed with chakra-ui-markdown-renderer v1.0.0. Do not forget to update your @chakra-ui version before update chakra-ui-markdown-renderer.

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

No branches or pull requests

3 participants