Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Use block support flag for hydration opt-in #48

Merged
merged 1 commit into from
Aug 8, 2022
Merged

Use block support flag for hydration opt-in #48

merged 1 commit into from
Aug 8, 2022

Conversation

yscik
Copy link
Collaborator

@yscik yscik commented Aug 8, 2022

Change the hard-coded list of supported blocks in the render_block hook.
Use a support flag, view, to enable frontend block hydration.

Also use an extend form of the flag to control the hydration technique setting.

At this point this is just a quick step to allow adding new blocks, I imagine the final API might look different.

Copy link
Member

@luisherranz luisherranz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we need to start thinking about the opt-in mechanism 🙂

I don't like view that much, as that name is already used by people using viewScript to enqueue regular JS files and I think it can be confusing, but we can figure that out later.

Feel free to merge 👍

@yscik yscik merged commit 564639c into WordPress:main Aug 8, 2022
@yscik yscik deleted the add/support-flags branch August 8, 2022 21:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants