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

Watermark rendering is not reactive #515

Open
trombipeti opened this issue Feb 19, 2024 · 2 comments
Open

Watermark rendering is not reactive #515

trombipeti opened this issue Feb 19, 2024 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@trombipeti
Copy link

Describe the bug
The watermark component is only rendered once and doesn't get rerendered even if the state that it uses gets updated.

To Reproduce
https://codesandbox.io/p/sandbox/sad-sound-3d4mt6

Steps to reproduce the behavior:

  1. Click the "Click me" button

Expected behavior
The value in the watermark gets updated and matches the one above it.

Actual behavior
The content of the watermark stays intact.

Additional context
I want to have a localized text in the watermark that should change when the user changes the app language.

@mathuo mathuo added this to the v1.10.1 milestone Feb 20, 2024
@mathuo mathuo added the bug Something isn't working label Feb 29, 2024
@mathuo
Copy link
Owner

mathuo commented Feb 29, 2024

Thanks for the report.

While I appreciate this is certainly a bug that I will get around to fixing at some point I believe this problem can be circumvented using some external state (state libraries) or passing some information down through a React.Context object for now?

@trombipeti
Copy link
Author

I've just tried it using a Context, seems to work:
https://codesandbox.io/p/sandbox/zealous-architecture-ft8837

I am looking forward to a proper fix, but in the meantime this context workaround could be used. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants