i-like-robots / react-tag-autocomplete

⚛️ A simple, accessible, tagging component ready to drop into your React projects (new repo)
https://i-like-robots.github.io/react-tag-autocomplete/
ISC License
178 stars 12 forks source link

Remove copied props from manager state #23

Closed i-like-robots closed 2 years ago

i-like-robots commented 2 years ago

It's always been a bad pattern to copy props into state and this causes bugs like #7. This PR refactors the useManager() hook and central managerReducer() to remove all props passed into the component from the manager state.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 3262760136

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/hooks/useManagerTwo.ts 153 156 98.08%
<!-- Total: 173 176 98.3% -->
Totals Coverage Status
Change from base Build 3233129098: 0.4%
Covered Lines: 1299
Relevant Lines: 1329

💛 - Coveralls