Reactjs – React state change on button click
My calling component, export const CallingComponent = () => { const [getApiData, setApiData] = //initial data binding from api return ( <CustomComponent defaultValue={getApiData()} onChange={(value: { toString: () => any }) => setApiData(value.toString()) } /> ); Component which is trying to…