React accesses internal properties on getField proxy, breaking future export FormOptionsProvider
#1056
Closed
transparent-citizen
started this conversation in
General
Replies: 1 comment 8 replies
-
|
Hmm, mind sharing your setup a bit more? I have updated the UI examples but I haven't seen this happened myself. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There seem to be cases during rendering where React tries to access properties such as
"$$typeof"or[Symbol.toStringTag]on the proxy returned by conform'sgetField.I noticed this while trying out the new
FormOptionsProviderAPI alongsidedefineCustomMetadata. The following error is thrown:Uncaught Error: Property "$$typeof" does not exist on field metadata. If you have defined the CustomMetadata interface to include "$$typeof", make sure to also implement it through the "defineCustomMetadata" property on <FormOptionsProvider />.which stems from
conform/packages/conform-react/future/state.ts
Lines 480 to 483 in 46ab924
As a workaround, adding these two getters to the
defineCustomMetadatafunction lets the app render without issues, but obviously this isn't ideal:Beta Was this translation helpful? Give feedback.
All reactions