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
Labels
v7 Issues related to Pixi React v7

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

@trezy trezy added v7 Issues related to Pixi React v7 bug Something isn't working labels Jun 15, 2024
@trezy trezy removed the bug Something isn't working label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v7 Issues related to Pixi React v7
Projects
None yet
Development

No branches or pull requests

2 participants