treecounter-app icon indicating copy to clipboard operation
treecounter-app copied to clipboard

Refactor usage of this.refs to access form data

Open norbertschuler opened this issue 4 years ago • 2 comments

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!

norbertschuler avatar Jun 22 '20 09:06 norbertschuler