As some of you know gutenberg introduced itself into the js and react.js ecosystem, trying to paint an image as a step forward towards modern web development.
After I tried it I was surprised to know that you could only use the reactive properties of React.js only in the edit.js,
so Only JavaScript on the editor mode.
if you try to put JavaScript in save.js you get an error, why?
because apperantly save.js only saves static html data to the db as posts and it isnt suppoused to allow any js reactive behaviour.
so this makes me wonder, if we are suppoused to make blocks that are just static, why introducing this all into React? who cares about react in the editor?
I’ve seen people doing some gymanstic moves to still use react on the static pages by basically writing js script that runs on every page and gets mounted on a div classname.
Could you tell me, am I getting it wrong or what exactly?
[ad_2]