Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

323
Views
restablecer el estado de retroceso al valor predeterminado no funciona

intenté restablecer el estado de retroceso a su valor predeterminado usando useResetRecoilState pero no funcionó Este es mi código

 import {filter} from '..appl/recoil/atoms'; import { useResetRecoilState } from 'recoil'; let filterReset = () => { useResetRecoilState(filter); } . . onSignOut = () => { /*Code for signout and other stuff*/ filterReset(); }

El código de estado de retroceso es:

 import { atom, useRecoilState } from 'recoil'; export const filter = atom({ key: 'filter', default: { handlers: [], product: '', origin: '', destination: '' } }

usó esta documentación pero no ayudó

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

useResetRecoilState devuelve una función que restablece el estado de retroceso. Debería usarse así:

 import {filter} from '..appl/recoil/atoms'; import { useResetRecoilState } from 'recoil'; onSignOut = () => { const filterReset = useResetRecoilState(filter); /*Code for signout and other stuff*/ filterReset(); }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!