화면에서 등록하기 버튼을 누르면 onChangeButton함수가 실행되어 객체가 전송될 수 있게 하려던 중
백단으로 넘어가는게 안되서 작성한다.


onChangeButton함수와 비동기로 post요청을 보내는 axios이다.

원래는 수정하기 버튼을 누르면 객체가 json형태로 로그로 출력된 후 백으로 넘어가야하는데 자꾸 에러가 났다.
http://localhost:8989/product' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Error fetching data: AxiosError {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …}