ctrlplusb / easy-peasy

Vegetarian friendly state for React
https://easy-peasy.dev
MIT License
5.03k stars 189 forks source link

Change default export with named export #917

Closed call0fcode closed 1 month ago

call0fcode commented 1 month ago

By exporting each hook in a default object doesn't allow to import them individually as shown down on the sample of how to use them.

It's very confusing for the users reading the docs.

Error displayed by ESLint: image

Alternative way of importing the typed hooks (not ideal): image

Ideal way of importing the typed hooks: image

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
easy-peasy ❌ Failed (Inspect) Aug 5, 2024 11:53am
jmyrland commented 1 month ago

Hey @call0fcode !

Thanks for your contribution! However, the vercel deploy is failing (for https://easy-peasy.dev/) and we (maintainers) have no way of fixing this (unless @ctrlplusb returns to give us access to the project).

I will however merge this PR, so the docs internally is updated 👍