akxcv/vuera

Context API support

Open

#50 aperta il 30 lug 2018

Vedi su GitHub
 (13 commenti) (9 reazioni) (0 assegnatari)JavaScript (264 fork)batch import
enhancementgood first issuehelp wanted

Metriche repository

Star
 (4260 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

I'm attempting to utilize Vuera to create Gutenberg components for Wordpress using Vue. Overall I'm pretty happy with it, but I'm running into a limitation that severely restricts the set of things I can do:

Gutenberg utilizes the Context API that was introduced in React 16 extensively throughout its built-in editor components, particularly to manage when a block is "selected" vs not. This context does not appear to bridge across the vuera embed.

The high level structure I'm using returns a VueInReact wrapped component to Gutenberg, with my core Vue component handling my custom logic, and then as necessary embedding ReactInVue wrapped Gutenberg builtins.

So we have React (gutenberg, sets context) -> Vue (my code) ----> React (gutenberg, looks for context and doesn't find it)

I'm happy to try to figure out/implement a fix for this, but would appreciate a pointer in the right direction if you have any ideas.

Guida contributor