[react] feat: Added new useFilter hook
This commit is contained in:
parent
0bbc7ef242
commit
ef6f59de80
1 changed files with 8 additions and 0 deletions
8
packages/react/hooks/useFilter/index.mjs
Normal file
8
packages/react/hooks/useFilter/index.mjs
Normal file
|
@ -0,0 +1,8 @@
|
|||
import React from 'react'
|
||||
import { useAtom } from 'jotai'
|
||||
import { atomWithHash } from 'jotai-location'
|
||||
|
||||
const filterAtom = atomWithHash('filter', { })
|
||||
|
||||
export const useFilter = () => useAtom(filterAtom)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue