akxcv/vuera

Context API support

Open

#50 opened on 2018年7月30日

GitHub で見る
 (13 comments) (9 reactions) (0 assignees)JavaScript (264 forks)batch import
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (4,260 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

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.

コントリビューターガイド