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
It looks a lot like this error (figma/plugin-typings#36), except it's with a React core library rather than Endo, so it may be harder to patch.
Update
I realized after writing this report that React hooks are not permitted in the code.tsx file, but I was confused earlier because they were permitted in the UI panel file. The fix is to use useSyncedState from the figma.widget API instead.
I'm filing this report anyways in case someone googling this error message may benefit and save themselves some trouble 😅
The text was updated successfully, but these errors were encountered:
Steps
When
code.tsx
from thecreate-widget-app
example is modified to a minimal example with state management:This error gets logged to the console when you try to import the widget:
Screenshot: https://a.cl.ly/GGu4957G
It looks a lot like this error (figma/plugin-typings#36), except it's with a React core library rather than Endo, so it may be harder to patch.
Update
code.tsx
file, but I was confused earlier because they were permitted in the UI panel file. The fix is to useuseSyncedState
from thefigma.widget
API instead.I'm filing this report anyways in case someone googling this error message may benefit and save themselves some trouble 😅
The text was updated successfully, but these errors were encountered: