tajo / ladle

🥄 Develop, test and document your React story components faster.
https://www.ladle.dev
MIT License
2.63k stars 93 forks source link

docs: Ladle with Next.js App Router #491

Closed cm-dyoshikawa closed 1 year ago

cm-dyoshikawa commented 1 year ago

https://github.com/tajo/ladle/issues/476

I wrote about using Ladle with Next.js App Router. Please tell me if there is anything missing.

I plan to add samples to e2e/next in a separate PR.

Thanks for this great library 🚀

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 420d3426e995d1b40659cc1d32cce90c864f2a08

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

tajo commented 1 year ago

While decorators are fine solution, maybe it makes sense to recommend using global Provider instead (https://ladle.dev/docs/providers) so the next/router works in all stories. And we can mention decorators as an alternative if you don't want to set it up globally, but I suspect, most people would use the router for more than a single story.

cm-dyoshikawa commented 1 year ago

@tajo Sorry, I was on extended holiday in my country so I couldn't respond. Thank you for merging. I would like to add how to use the Global Provider for the same problem to the documentation, so I'll create a separate Pull Request.