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

Bug: BitmapText style not changing when style prop changes #462

Open
CaptainTux opened this issue Nov 5, 2023 · 0 comments
Open

Bug: BitmapText style not changing when style prop changes #462

CaptainTux opened this issue Nov 5, 2023 · 0 comments

Comments

@CaptainTux
Copy link

Current Behavior

When I change the style property of a BitmapText component, e.g. by creating a new object, the rendered output does not update accordingly.

Expected Behavior

When the component re-renders with an updated style property, I expect the style in the rendered bitmap text object to be updated accordingly

Steps to Reproduce

https://codesandbox.io/s/mystifying-taussig-jykccy?file=/src/App.js

Environment

Possible Solution

A workaround is to specify those properties explicitly, e.g.
<BitmapText text="whatever" fontName={fontName} style={{fontName}} />
The issue is that on first render the style prop is required, but to update it we need to explicitly provide the fontName prop, which is confusing.

Additional Information

No response

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

1 participant