I am using React context and antd design table, when context state "transaction" changed after API all, component re-rendered, I can see updated transaction with console.log, but seems component not getting new transaction, the "Target" column still shows old target data. please let me what went wrong, Thank you!
const { transaction, getTransactions, deleteTransaction, updateTransaction } = useContext(GlobalContext);
column = {
title: "Target",
dataIndex: ["analysis", "Target"],
},
return (
<div className="table-container">
<Table
columns={columns}
dataSource={transaction}
size="middle"
rowKey="_id"
pagination={{ pageSize: 15 }}
/>