GithubHelp home page GithubHelp logo

isabella232 / block-hydration-experiments Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wordpress/block-interactivity-experiments

0.0 0.0 0.0 883 KB

Pattern explorations for block frontend hydration

JavaScript 79.56% PHP 13.42% SCSS 7.02%

block-hydration-experiments's Introduction

Block Hydration Experiments

This repository aims to explore block hydration patterns with the goal of absorbing as much complexity as possible from the final developers.

It's not a goal to do an in-depth analysis of the patterns, only to experiment with them in a controlled environment to assess their potential and then test them in the Gutenberg repository, where we will see if they are a good fit or not.

Current Experiments

  • ๐Ÿ Island Hydration

    This hydration method is based on custom elements (<wp-block>) that hydrates isolated islands. It interconnects those islands through synchronized bridges for APIs like context, Suspense or ErrorBoundary.

  • โš›๏ธ Full vDOM Hydration

    This hydration method is based on the creation of a static virtual DOM from the root, where only the interactive components are replaced by P/React components. It behaves like a single P/React application.

Project structure

Blocks are structured using these folders/files:

  • edit: User code exclusive to the Edit component.
  • view: User code exclusive to the View component.
  • shared: User code shared between Edit and View components.
  • gutenberg-packages: Framework code that should be absorbed by Gutenberg packages.
  • webpack: Bundling configuration that should be absorbed by @wordpress/scripts.

Block Requirements

If you want to use these experiments on your blocks, they will need:

  • To have a block.json file.
  • To be registered on the server.

Collaborate!

Feel free to clone this repository and inspect the code, open issues, submit PRs, suggest features or ask questions!

And if you are doing any other frontend-related work, please leave a comment in this Make Core post.

block-hydration-experiments's People

Contributors

c4rl0sbr4v0 avatar darerodz avatar fabiankaegy avatar luisherranz avatar michalczaplinski avatar ockham avatar yscik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.