Skip to content

Move sync state and adding functions to App.js  #31

Open
@zoeyfrisart

Description

@zoeyfrisart

Measurements sync, Adding mesurements and media functions should be moved to App.js

How we do it now

  • Every component that needs measurements we resync the measurement.
  • The Add & AddMedia Components Sync the whole measurements.
  • The function that adds the data is inside the Add & AddMedia Component.

Why does this need improving.

  • This request the data way more often that needed.
  • We repeat the same code multiple times.
  • Longer loading times.

What would we need to change.

  • Move the ComponentWillMount sync state to the App.js and pass the measurements as a prop.
  • Move the AddMeasurement function to App.js and pass it down as a function
  • Move the AddMedia function to App.js and pass it down as a function.

What files are affected.

  • add/index.js
  • addMedia/index.js
  • measurement/index.js
  • App.js

Estimated time needed to change.

This should take a max 1-2 hours.

Metadata

Metadata

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions