Skip to content

Commit

Permalink
Remove use-query-params
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamahl19 committed Dec 4, 2023
1 parent ae35a66 commit feff48f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 78 deletions.
2 changes: 0 additions & 2 deletions DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ i18next ecosystem provides [many plugins and tools](https://www.i18next.com/over

A de facto standard for route management in React apps is a [React Router](https://reactrouter.com/). This project uses the newest v6 version which brings new features and removes some previously confusing concepts. It's best to read [Quick Start Overview](https://reactrouter.com/en/main/start/overview) first, then proceed to [FAQ](https://reactrouter.com/docs/en/v6/getting-started/faq) mostly related to v6 changes. The documentation also provides a simple [Tutorial](https://reactrouter.com/en/main/start/tutorial). To improve understanding of concepts, vocabulary, and design principles of React Router, go to the [Main Concepts](https://reactrouter.com/en/main/start/concepts).

When creating an app with easily shareable URLs, you often want to encode state as query parameters, but all query parameters must be encoded as strings. Library [use-query-params](https://github.com/pbeshai/use-query-params) allows you to easily encode and decode data of any type as query parameters with smart memoization to prevent creating unnecessary duplicate objects. It's setup in the [src/app/providers/Router.tsx](./src/app/providers/Router.tsx).

Generation of breadcrumbs is covered by [use-react-router-breadcrumbs](https://github.com/icd2k3/use-react-router-breadcrumbs) and used in [src/features/dashboard/components/DashboardPageHeader/index.tsx](./src/features/dashboard/components/DashboardPageHeader/index.tsx).

## State Management
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ There are multiple alternative versions of this starter project commited to diff
- [Jotai](https://jotai.org/) - state management library
- [React Router](https://reactrouter.com/) - declarative routing
- [use-react-router-breadcrumbs](https://github.com/icd2k3/use-react-router-breadcrumbs) - hook for generating route breadcrumbs
- [use-query-params](https://github.com/pbeshai/use-query-params) - hook for managing state in URL query parameters with easy serialization
- [react-error-boundary](https://github.com/bvaughn/react-error-boundary) - simple reusable React error boundary component
- [Vitest](https://vitest.dev/) - blazing fast Vite-native unit test framework
- [Testing Library](https://testing-library.com/) - simple and complete testing utilities that encourage good testing practices
Expand Down
116 changes: 44 additions & 72 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@reflet/http": "1.0.0",
"@tanstack/react-query": "5.12.2",
"@tanstack/react-query-devtools": "5.12.2",
"antd": "5.11.5",
"antd": "5.12.0",
"dayjs": "1.11.10",
"deepmerge-ts": "5.1.0",
"i18next": "23.7.7",
Expand All @@ -55,7 +55,6 @@
"react-i18next": "13.5.0",
"react-router-dom": "6.20.1",
"use-debounce": "10.0.0",
"use-query-params": "2.2.1",
"use-react-router-breadcrumbs": "4.0.1",
"zod": "3.22.4",
"zod-fetch": "0.1.1"
Expand Down Expand Up @@ -107,7 +106,7 @@
"source-map-explorer": "2.5.3",
"terser": "5.24.0",
"typescript": "5.2.2",
"vite": "5.0.4",
"vite": "5.0.5",
"vite-plugin-checker": "0.6.2",
"vite-plugin-svgr": "4.2.0",
"vite-tsconfig-paths": "4.2.1",
Expand Down

0 comments on commit feff48f

Please sign in to comment.