Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jetpack Boost: Bare bones React DataSync Prototype (#33657)
* Prototype * Rollup Limitation Workaround: TypeScript Failure Rollup is failing to compile typescript - so for now distribute this as JavaScript * Unused config * Debugging messages * Add react data sync client in Jetpack Boost * Migrate MinifyMeta component to React * Update property name * Update MinifyMeta component structure * Revert "Update MinifyMeta component structure" This reverts commit c1042bcc73f0238500e5df0d19726ac405501fd6. * optionKey -> datasyncKey * Address any complaints * Add todos * Whoops, forgot to migrate optionKey -> datasyncKey to usage This is what you get for not having typescript checks (afaik not possible with ReactComponent at the moment) * Clean up data sync entry adapter type * Subscribe to an interface The design here was flawed - datasync requested Schema even though it actually needs something that subscribes to the Parser contract. This is called the "code to interface, not the implementation" principle. This gets rid of quite a few phpStorm inspection warnings in wp-js-data-sync.php in boost * Add "Any" type to DataSync Parser * Add Data_Sync_Readonly * Export all DataSyncHooks * Readonly hook * SWR already de-dupes requests, no need for signals * Expose SWR config on DataSync hooks * Prevent revalidating on Mount window already has the data * Disable debug inspection * plugins_dir_path for the pencil * Add @todo * To-done * Use react-query * Upgrade react-query to latest-ish version * Refactor swr to react-query * We need signals in DataSync once again This reverts commit 51eb7dc8b101cad6802bbd8b6effb24270736155. * Use signals in GET * Improve variable naming * Update lock file * Add changelogs * Update pencil location and color * Remove unused statements * Update wp-js-data-sync version * Remove (svelte) MinifyMeta component * Replace unused minify svelte store with react version * Fix dependency exports * Add babel config --------- Co-authored-by: Peter Petrov <[email protected]> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/6742350122
- Loading branch information