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

351
Views
no puedo resolver este error TypeError no detectado: deleteTranscation no es una función no puedo entender por qué no es una función

 import { createContext, useReducer } from "react"; import AppReducer from "./AppReducer"; //intial state const initialState = { transactions: [ { id: 1, text: "Flower", amount: -20 }, { id: 2, text: "Salary", amount: 300 }, { id: 3, text: "Book", amount: -10 }, { id: 4, text: "Camera", amount: 150 }, ], }; // Create Global Context export const GlobalContext = createContext(initialState); // provider component export const GlobalProvider = ({ children }) => { const [state, dispatch] = useReducer(AppReducer, initialState); // Actions const deleteTransaction = (id) => { dispatch({ type: "DELETE_TRANSACTION", payload: id, }); }; return ( <GlobalContext.Provider value={{ transactions: state.transactions, deleteTransaction }} > {children} </GlobalContext.Provider> ); };
 <script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.0/umd/react.production.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.0/umd/react-dom.production.min.js"></script>
este es mi contexto con mi reductor y cuando obtengo mis datos en mi componente de transacción, no obtengo que eliminar transacción sea una función

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!