question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Examples of how to use the framework with react/vue etc

See original GitHub issue

Feature/component description

I can’t wait to put it into my vs code extension development, my webview uses react and I want to use these components in a jsx way instead of a template string, I didn’t find an answer in the documentation for this way

Use case

import { vsCodeBadge as VsCodeBadge } from '@vscode/webview-ui-toolkit/dist/dts/badge';

function Demo() {
  return <VsCodeBadge> demo </VsCodeBadge>
}

It seems to be not possible.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:49 (25 by maintainers)

github_iconTop GitHub Comments

6reactions
hawkticehurstcommented, Nov 16, 2021

With all that said, there’s been some internal discussion, and based on what we’ve seen from the community experience thus far we’ve decided to experiment with having the toolkit take on the responsibility of wrapping the toolkit components.

We would ideally publish the wrapped components ourselves so that all of you might be able to consume them with an import syntax along these lines:

import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react";

And hopefully, this will alleviate what has seemingly been a bit of a painful process to get React toolkit components working. More to come on this soon.

5reactions
hawkticehurstcommented, Jan 25, 2022

🎊 Toolkit package v0.9.0 just dropped today and now ships a set of React components!

Using the new components is as simple as importing the toolkit package into your project and just adding ‘/react’ to the end of the import path. For example:

import { VSCodeButton } from '@vscode/webview-ui-toolkit/react';

Most of the original toolkit documentation should map 1:1 with the new React components, but dedicated documentation and sample extensions will be coming in the next few days.

This work also wraps up one of the last big milestones as we work towards a 1.0 release. From here on it’s just catching up on some important backlog issues, adding more documentation, and final polishing!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue.js vs React: We built an app on both frameworks
In this article we compare Vue.js and React regarding their learning curves, community support, and which one to choose based on our ...
Read more >
Vue vs React – How to Go from One Framework to the Other
In React, you would create the function that will be executed (when button is clicked) in the parent, where the function has access...
Read more >
Integrating React and Vue Components in One Application
I have used Vue and React and have found them both interesting. I have created interesting components in both, and there are times...
Read more >
Vue vs React - Code Examples - YouTube
We take a look at accomplishing tasks in both Vue.js and React using concrete code examples. Topics include CSS, state, methods and event ......
Read more >
React vs. Vue (Exact Todo App) By Example - Medium
While Vue was much fun and simpler, React was more architectured to work with . The documentation of any framework is important ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found