# How to use React Props w/ uppy along with Formik for AWS Upload

**URL:** <https://community.transloadit.com/t/how-to-use-react-props-w-uppy-along-with-formik-for-aws-upload/14902>\
**Category:** Uppy\
**Created:** [April 24, 2019, 11:54am UTC](https://community.transloadit.com/t/how-to-use-react-props-w-uppy-along-with-formik-for-aws-upload/14902 "2019-04-24T11:54:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nithinkashyapn](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/nithinkashyapn/32/111_2.png) [@nithinkashyapn](https://community.transloadit.com/u/nithinkashyapn)\
**Post date:** [April 24, 2019, 11:54am UTC](https://community.transloadit.com/t/how-to-use-react-props-w-uppy-along-with-formik-for-aws-upload/14902/1 "2019-04-24T11:54:30Z")

</div>

Hey,

I am using `uppy` as an upload component and I want to pass props to it and refresh the values of those props when the value in the parent component changes.

My current setup is like [this](https://gist.github.com/nithinkashyapn/53349209ee7514f3aead89642099ab20)

Since I am using `Formik` I am using the `setFieldValue()` to set the value after the file is uploaded and it is working, since S3 supports versioning I am trying to reset the filename to a new filename or the previous filename which was assigned. The new filename is working but I am not able to retrieve the values using props from the parent component to set the previous assigned filename.

The constructor is showing the initial values itself every time i upload something while the actual values are getting updated.

How do i solve it and make it take the actual prop values.

Thanks,

- Nithin

---

<div class="post-metadata">

**Author:** ![ajkachnic](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/ajkachnic/32/260_2.png) [@ajkachnic](https://community.transloadit.com/u/ajkachnic)\
**Post date:** [July 26, 2020, 3:19pm UTC](https://community.transloadit.com/t/how-to-use-react-props-w-uppy-along-with-formik-for-aws-upload/14902/2 "2020-07-26T15:19:36Z")

</div>

Hello there! First off, for class components, you should also include

```javascript
 componentWillUnmount () {
    this.uppy.close()
  }

```

In your component.

Also, `getOldFileName` isn’t an async function (unless `_.get` returns a promise), and you’re calling it with `await`.

As for the issue that you’re reporting, I can’t be too sure of your error. Is there any sort of log output that you can send?

In the meantime, I’ll keep looking through the code and see if I can find any other issues

- Andrew
