c8r / kit

Tools for developing, documenting, and testing React component libraries

Home Page:https://compositor.io/kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should *examples* be React components or elements

jxnblk opened this issue · comments

Currently the dev server filters JS files and only attempts to render components (e.g. functions, props => <Button>Hello</Button>). For snapshots, storybook stories, etc., a static React element is usually good enough (and we don't pass props into these anyhow) – e.g. <Button>Beep</Button>.

It's probably a good idea to either make the dev server handle elements as well, or perhaps make all the utilities handle both components and elements