imbhargav5 / rooks

Essential React custom hooks ⚓ to super charge your components!
https://rooks.vercel.app
MIT License
3.2k stars 215 forks source link

Fix: return type `ReadonlyMap` in useNativeMapState #1716

Closed ChocolateLoverRaj closed 1 year ago

ChocolateLoverRaj commented 1 year ago

This will prevent bugs where people try to directly modify the map. By making it a ReadonlyMap, they will have TypeScript errors which will remind them to modify mapControls instead of map.

codesandbox[bot] commented 1 year ago

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

vercel[bot] commented 1 year ago

@ChocolateLoverRaj is attempting to deploy a commit to the Rooks Team on Vercel.

A member of the Team first needs to authorize it.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (37c35ce) 90.13% compared to head (99fc590) 90.13%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1716 +/- ## ======================================= Coverage 90.13% 90.13% ======================================= Files 98 98 Lines 6729 6729 Branches 1112 1111 -1 ======================================= Hits 6065 6065 Misses 662 662 Partials 2 2 ``` | [Impacted Files](https://codecov.io/gh/imbhargav5/rooks/pull/1716?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bhargav+Ponnapalli) | Coverage Δ | | |---|---|---| | [packages/rooks/src/hooks/useNativeMapState.ts](https://codecov.io/gh/imbhargav5/rooks/pull/1716?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bhargav+Ponnapalli#diff-cGFja2FnZXMvcm9va3Mvc3JjL2hvb2tzL3VzZU5hdGl2ZU1hcFN0YXRlLnRz) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bhargav+Ponnapalli). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bhargav+Ponnapalli)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

vercel[bot] commented 1 year ago

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

Name Status Preview Comments Updated (UTC)
rooks ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2023 6:40pm
imbhargav5 commented 1 year ago

Love this @ChocolateLoverRaj ! Very useful. Could you add a changeset so I can publish this. You will find the details in the Contributing.md file. 🙏