#Documenting Web Components With Storybook

1 messages · Page 1 of 1 (latest)

tender pebble
thin jetty
#

Hey @tender pebble , great write up! Is it ok to circulate this on social networks and slacks?

tender pebble
#

@thin jetty Certainly!

#

If you post it on LinkedIn please tag me 😄

thin jetty
#

Found you! 🙂 I'll do that when I'm at work!

tired sedge
#

@tender pebble have you considered useing argsEnhancers and argTypesEnhancers to automatically inject these based on the component names? I've had reasonable success doing this, though it's a poorly documented part of the preview api

tender pebble
#

I've not heard about this before so no

#

We do need to define the tag name regardless though, so the boiletplate is super minimal

tired sedge
#

for sure - I'm just incredibly lazy, and will go to great efforts to be so (:

Great write up though, one I'd wish I'd read a few years ago. Applicable equally to non-wc; I've found the built in docgen in React to be painfully slow.

thin jetty
#

I also have never heard of that

#

@tired sedge are you volunteering to write about it?

tired sedge
#

Yeah, I’ll try to find time to put something together tomorrow.

I can’t remember how I discovered it - I’d actually raised a discussion on github for adding an api exactly like it without realising it was there already, and used in react to sniff the byteweaved output of the docket plugins

#

The hard part, as Jives notes, was working out the right structure for the arg types 🫠

thin jetty
#

I look forward to seeing it! Don't let that hidden gem go to waste!