You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Current Behavior
When I change the
style
property of aBitmapText
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 accordinglySteps to Reproduce
https://codesandbox.io/s/mystifying-taussig-jykccy?file=/src/App.js
Environment
@pixi/react
version: 7.1.1pixi.js
version: 7.3.2React
version: 18.2.0ReactDOM
version: 18.2.0Possible 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 thefontName
prop, which is confusing.Additional Information
No response
The text was updated successfully, but these errors were encountered: