Relative Content

Tag Archive for reactjstanstackreact-query

state is not properly updated when using with `tanstack-query`

I have an Uploader component that can be both controlled and uncontrolled. The instantUpload prop allows for immidiate update once the files are chosen. Unfortunately, for some reason the files variable is not updated properly in onUploadProgress and onSuccess callback (i.e. files is an empty array instead of a chosen file). Any reason why is that a case?