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
Describe the bug
Anonymous function components defined at runtime are able to be used with Craft.js, but on hydration from saved data, they fail to be re-mapped.
To Reproduce
Create a Craft.js component dynamically, save to data-store, try to re-hydrate later.
Invariant failed: An Error occurred while deserializing components: Cannot find component <CallToAction /> in resolver map. Please check your resolver in <Editor /> Available components in resolver: Base, AnimatedBanner, CallToAction
Expected behavior
Craft.js should use the Key for a component in the resolver, not the function name as currently happens. Otherwise, Craft.js should make it explicitly clear that anonymous functions cannot be used within the resolver and check for this.
Your environment
Software
Version(s)
craft.js
0.1.0-beta.20
React
17.0.2
Browser
Opera
Operating System
Windows
The text was updated successfully, but these errors were encountered:
Invariant failed: An Error occurred while deserializing components: Cannot find component <CallToAction /> in resolver map. Please check your resolver in <Editor /> Available components in resolver: Base, AnimatedBanner, CallToAction
Describe the bug
Anonymous function components defined at runtime are able to be used with Craft.js, but on hydration from saved data, they fail to be re-mapped.
To Reproduce
Create a Craft.js component dynamically, save to data-store, try to re-hydrate later.
Results in an invariant error along the lines of:
Expected behavior
Craft.js should use the Key for a component in the resolver, not the function name as currently happens. Otherwise, Craft.js should make it explicitly clear that anonymous functions cannot be used within the resolver and check for this.
Your environment
The text was updated successfully, but these errors were encountered: