I´m trying to pass a value inside of my function but the result is undefined
function ExpanseTable() {
const [month, setMonth] = useState('Dec')
console.log(month + " outside function") // Dec
const updateMyData = (rowIndex, columnId, value, id, testValue ) => {
console.log(month + " inside function") //undefined
};
}
updateMyData is called in
<Table
updateMyData={updateMyData}
/>