githubnext / githubnext/vscode-react-webviews

Info: How to pass in a message from another command to the webview?

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I have tried exposing a ``postMessage`` function in ``NextViewWebpanel`` class and then posting a message to ``this.panel.webview.postMessage``, but I can't get it working. I'd like to update the VSCodeAPI State.

What is the best practice in updating the state of the webview from another command?

Some context:
I'm trying to pass text from the editor to the webview.

Thank you in advance!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.