-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use multiple Frameworks on Storybook #3889
Comments
I think this is basically the same ask as using the one manager for multiple preview iframes also (even if they are all using the same framework), which is useful for users using a monorepo too. @ndelangen and I spoke briefly about this; I suspect it might come out in the wash with the changes made to support documentation mode, but I am not sure. |
More likely after, but I might do it in between too if an easy implementation comes to me in the shower. Splitting Manager from Preview webpack would be step 1 |
What if we implement frameworks support as decorators for |
That's a really good insight @Hypnosphi |
@Hypnosphi I ended up in the same spot -- I've just got a wrapper returning React elements as DOM to the HTML DOM framework. The react plugin spits some warnings to console but it's otherwise working. I've mixed angular1 and react, and used angular2react to show components working across a single storybook. |
Is this part of |
@btecu Nope, the issue is still work in progress |
Same, this would be very useful, we have a design system where we vend out support for React and basic HTML via CSS, and having source code and preview widgets support that would be awesome. Any suggestions where a change like this would need to take place? I may be able to take a stab at it. |
Does #9210 address this issue? If yes, then it looks like this feature has already been added. Correct me if I am wrong. |
@shilman thanks. I am working on a project that is using both angularjs and angular as we are in process of migrating. I was considering storybook for this project. A documentation for this would be very helpful. |
Is there any status update on examples and/or docs for this feature? |
@shilman link broken |
Until we come up with something better, composition is the officially supported way to do multi-framework Storybook. Moving this to 7.0 unless somebody wants to work on it earlier. |
@littlefengers shared a (probably easier) custom implementation of multiple Source tabs: Perhaps in the roadmap too? @shilman |
With this approach they used the controls still stays as react props, how about an option to disable/enable top level roots so we can use the toolbars & globals to toggle between certain frameworks when using composition? |
Would it be possible for 7.0 instead of using composition to get other running instances of storybook, to instead also be able to use a top level storybook that compiles other storybooks used in refs and embedding them in a single running instance? If there are multiple frameworks, it could detected automatically based on the root of the config file being used and the |
Any updates ? I'd like to get React and SolidJs (I know it's not officially supported yet) on the same storybook |
At this time, composition is still the way to go. https://storybook.js.org/docs/react/sharing/storybook-composition/ The reason we're not investing more in getting multiple frameworks running in a single instance is because we get an insane number of support requests about webpack/babel configuration, and supporting multiple frameworks will increase configuration complexity. Once we've fixed the performance and configuration issues with single-framework storybook, we might have an appetite to try to tackle this again. In the meantime, we'll continue to make composition better. |
Unfortunately I'd need to change the `framework` config for storybook, and you [can't currently mix frameworks](storybookjs/storybook#3889). Going to revert this but wanted a record of the journey
@shilman Is there any update or example for how to do multiple FE frameworks with storybook and tabs like shown above? I'm creating a design system that should support vue2 and vue3. |
If you want to develop react within a storybook setup for webcomponents. You can use this decorator to render stories. const meta = {
title: 'react-in-wc-storybook',
decorators: [(Story) => {
const domNode = document.createElement('div');
createRoot(domNode).render(<Story />);
return domNode;
}],
}; We have a storybook with webcomponents and react wrappers around those webcomponents. To test these wrappers we can now just render the react components within the storybook webcomponent instance. |
Hi, I'm trying to do exactly this. Building components in web components, and have React wrappers of them, and want to demo them in Storybook. Do you have a full example of a story like that? For example, where is |
Now that version 8 is out, is there an update one this? I have a React app that is the wrapper for a Pixi canvas app, and I'd like to use Storybook with both the React app and the individual Pixi components via the pixijs/storybook framework. |
I'm also wondering if there are any updates for this. I have an Astro project where we have both Vue and React components, and would like to have both in the same storybook setup. |
Hello,
are any updates to the Issue: #1704 ?
I would like to use the React and Vue Framework on the Storybook.
Thanks.
Fabian
The text was updated successfully, but these errors were encountered: