storyblok / field-plugin

Create and deploy Storyblok Field Plugin
https://www.storyblok.com/docs/plugins/field-plugins/introduction
MIT License
25 stars 3 forks source link

poc: stateless lib #218

Closed johannes-lindgren closed 1 year ago

johannes-lindgren commented 1 year ago

❗ Work in progress

The current implementation of the field plugin library manages three states:

This is a proof of concept of how the library could look like if we removed the library's state and only kept the state in

This has the benefit of only having to maintain two states.

The problem is as whereas the library syncs the state between the visual editor and the library, this approach moves this responsibility to the hook. Because there is one hook for each framework, this means that we now need to implement the syncing logic once for each framework, instead of once for the library.

What?

Why?

JIRA: EXT-

How to test? (optional)

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
plugin-sandbox ✅ Ready (Inspect) Visit Preview Jun 27, 2023 9:55am