treecounter-app
treecounter-app copied to clipboard
Refactor usage of this.refs to access form data
Using this.refs
to access form data sometimes fails, e.g.
- https://github.com/Plant-for-the-Planet-org/treecounter-app/issues/1989 or https://github.com/Plant-for-the-Planet-org/treecounter-app/issues/2216
- https://github.com/Plant-for-the-Planet-org/treecounter-app/issues/1998
- https://github.com/Plant-for-the-Planet-org/treecounter-app/issues/2085
- https://github.com/Plant-for-the-Planet-org/treecounter-app/issues/2208
- https://github.com/Plant-for-the-Planet-org/treecounter-app/issues/2524
- https://github.com/Plant-for-the-Planet-org/treecounter-app/issues/2566
- https://github.com/Plant-for-the-Planet-org/treecounter-app/issues/2574
Therefore the usage probably should be change towards the solution used at https://github.com/Plant-for-the-Planet-org/treecounter-app/blob/2b968b0636cbc2c44a5d28ce2fe4361fef23eb0b/app/components/EditUserContribution/index.js#L110 in the whole codebase!