Skip to content
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

Decorator less addons (experiment on KNOBS) #1304

Closed
wants to merge 1 commit into from

Conversation

alexandrebodin
Copy link
Contributor

What I did

I started experimenting with decoratorless addons after a discussion with @ndelangen.

I tried it out and could knobs "work" (only updating values no reset etc) with a decorator.

I think that's pretty cool, and we should maybe add it to the api somehow as a good practice pattern.

My opinion is that with such an approach. We can lift the refreshing need etc in the api and let user use our addons without too much thinking.

If they really need a decorator that should be for a specific use case (theme etc) that maybe we should let the user handle on it's own.

This is just an experiment but might be worse thinking about for the addon api v2 😄

@storybookbot
Copy link
Collaborator

Fails
🚫

PR is marked with "do not merge" label.

🚫

PR is not labeled with one of: ["cleanup","breaking","feature","bug","documentation","maintenance","greenkeeper","other"]

Generated by 🚫 dangerJS

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. This is really cool! Though i think I still prefer a decorated version that doesn't use context :)

@ndelangen
Copy link
Member

I'll close the PR, please re-open when development continues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants