Need help with block attributes resetting to default

[ad_1]

I am in the process of migration my plugin’s numerous metaboxes to Gutenberg blocks. I mostly have building Gutenberg block figured out but today I ran into some weird behaviour that I cannot figure out.

I am creating a dynamic block that has some attributes, that are being saved, as I can see the saved values on the frontend. However, when I reload the editor, the attribute values that are being shown are the default values.

Please see this git repo for the code: [https://github.com/w33zy/rpr-nutrition])

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer