Skip to content

atomicojs/storybook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@atomico/storybook

Allows projects to render projects with virtualDOM

Setup

create .storybook/preview file and add the following script.

import { decorator } from "@atomico/storybook";

export const decorators = [decorator];

how to disable hmr? (Optional)

Create the file .storybook/disable-hmr.js and add the following script.

if (module && module.hot && module.hot.decline) {
    console.log(module);
    module.hot.decline();
    const hmr = new EventSource("__webpack_hmr");
    hmr.addEventListener("message", function fullPageReload(event) {
        try {
            const { action } = JSON.parse(event.data);
            if (action === "built") {
                location.reload();
            }
        } catch (error) {}
    });
}

render compatibility

  • atomico
  • @atomico/lit-html
  • @atomico/uhtml