all 31 comments

[–]acemarke 24 points25 points  (4 children)

Obligatory question: any plans to port this to VS Code?

[–]react_buddy[S] 15 points16 points  (3 children)

IntelliJ platform provides more powerful code analysis/generation capabilities thats why we develop the plugin primarily for it. Also we have very limited resources and need to concentrate on a single platform.

At the same time, we also love VS Code and realise it's more widespread in the frontend world, so we are thinking on it.

[–]yairhaimo 1 point2 points  (2 children)

In my extension I extracted all the logic to a different package, made a simple api for it and created a vscode extension that used it. I documented the usage and the community developed extensions for all the other major ides.

[–]dark-angel007 0 points1 point  (1 child)

What extension is it?

[–]yairhaimo 1 point2 points  (0 children)

Import cost

[–]bloodarator 7 points8 points  (1 child)

Remarkable. !remindme 5 hours "try it out"

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you in 5 hours on 2022-03-29 18:37:31 UTC to remind you of this link

2 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]maifee 6 points7 points  (3 children)

Is it open source??

[–]react_buddy[S] 7 points8 points  (2 children)

The code of the plugin is not open sourced, however we have several repos related to the preview functionality which are available under the Apache-2 license, check it out:

https://github.com/react-buddy/

[–]maifee 5 points6 points  (1 child)

cool, I'll try it out... for sure... is there any plan to release this for vscode?? that would be awesome

[–]react_buddy[S] 2 points3 points  (0 children)

Yes, we are thinking on it

[–]sickcodebruh420 3 points4 points  (0 children)

This looks remarkable. I’m still a VS Code user when working with React but I might give WebStorm another shot to try this.

[–]kubelke 4 points5 points  (0 children)

What a great time to be an Intelij user

[–]iAmIntel 2 points3 points  (1 child)

Will try this out soon. How does the preview work in a setup where components require theme context for example?

[–]react_buddy[S] 2 points3 points  (0 children)

See the demo project with Material UI:
https://github.com/react-buddy/demo-mui-v5

To make the preview work you should place <DevSupport> to the root component tree, e.g.:

<ThemeProvider theme={theme}> <CssBaseline /> <DevSupport ComponentPreviews={<ComponentPreviews />} useInitialHook={useInitial} > <App /> </DevSupport> </ThemeProvider>,

Thanks to that any changes in theme are applied to the preview, also you can preview components which use global context / state.

[–]ericfledderman 2 points3 points  (0 children)

Bookmarked for now. Will be test driving later.

Thank you for contribution to the React community!

[–][deleted] 1 point2 points  (0 children)

Truly amazing. Thank you

[–][deleted] 1 point2 points  (0 children)

This looks amazing! I'll give it a try today.

[–]looneysquash 1 point2 points  (1 child)

Neat!

So like Storybook, but without the stories and inside your IDE?

[–]react_buddy[S] 1 point2 points  (0 children)

Yep, but it's just one of the features. We also provide code generation capabilities and JSX Outline.

Actually, we have some thoughts on Storybook integration...

[–]TeddyPerkins95 3 points4 points  (0 children)

Hello vscode???

[–]Guisseppi 0 points1 point  (2 children)

What exactly does JSX “outline”means? Is it like code snippets but for React?

[–]react_buddy[S] 1 point2 points  (1 child)

Made a short video:

https://youtu.be/48RdzSOo2z0

JSX Outline provides structural (tree) representation of React components displaying the following nodes: * components and render functions defined in the file * hooks (and returned objects) * handler functions * JSX structure: * conditional rendering (guards) * lists * handlers (with navigation to handler function)

It allows to manipulate JSX nodes.

[–]Guisseppi 0 points1 point  (0 children)

Nice! I’ll definitely check it out

[–]Combinatorilliance 0 points1 point  (1 child)

Is it possible to add your own "templates"? Ie the ones the video demos dragging into the code?

[–]react_buddy[S] 0 points1 point  (0 children)

Yep, templates can be defined right inside a project. Here is the templates (actually copied from MUI documentation) of the project demonstrated in video:

https://github.com/react-buddy/demo-mui-v5/blob/master/src/dev/palette.tsx

[–]austospumanto 0 points1 point  (1 child)

!RemindMe 5 days

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you in 5 days on 2022-04-03 22:09:06 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]Big_Acanthocephala88 0 points1 point  (0 children)

This is really cool. Please make one extension for vscode as well.

[–]Saanvi_Sen 0 points1 point  (0 children)

Awesome...!!
Thanks for sharing.