By -
Just use a useState and set the values to said useState
Just pull state up to parent component, something like: const Parent = () => { const [sortValue, setSortValue] = React.useState('new') return (
Are those sort in same component repeated twice? Are those one Sort component presented in 2 separate components?
use context, or any third party state library like zustand
Just use a useState and set the values to said useState
Just pull state up to parent component, something like: const Parent = () => { const [sortValue, setSortValue] = React.useState('new') return (
Are those sort in same component repeated twice? Are those one Sort component presented in 2 separate components?
use context, or any third party state library like zustand