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

222
Views
¿Cómo puedo configurar datos createContext?

¿Cómo puedo configurar los datos en el estado?

¿Y cómo puedo resolver el error createContext ?

 export const LastChanceContext = createContext() //in there return error: Expected 1 arguments, but got 0. export const GET_LASTCHANCE = "GET_LASTCHANCE" const LastChanceWrapper = ({children} : {children:any}) => { const initialState = { lastChances: [], lastChance: {} }; console.log('asd',initialState); const [state, dispatch] = useReducer(lastChanceReducer, initialState); useEffect(() => { const getLastChance = async () => { const result = await axiosFetch('http://65.21.148.176:2803/api/Home/Get'); const action = { type:GET_LASTCHANCE, payload:result.data.data.lastChanceList }; if(Object.keys(result).length !== 0) { dispatch( {state, action} ) console.log(result.data.data.lastChanceList); } }; getLastChance(); }, []) return ( <LastChanceContext.Provider value={{ lastChances: state.lastChances, lastChance: state.lastChance }}> {children} </LastChanceContext.Provider> ) } export default LastChanceWrapper
about 4 years ago · Juan Pablo Isaza
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!