Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-4485

Move compass-crud state items into a store

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: CRUD, Tech debt
    • Labels:
      None
    • Not Needed

      Currently compass-crud stores a number of items in it's component's states. Things like editing state, update error messages, and whether or not fields/documents are expanded.

      This also might help prevent us from having bugs which can occur when reconciling a store's state with a components state within the render cycle which is something we currently do in `componentDidUpdate` in the `json-editor` component for instance https://github.com/mongodb-js/compass-crud/blob/master/src/components/json-editor.jsx 

      These are things which should be stored in a store, which we can persist when the plugin is unmounted. This would free us from keeping various plugins mounted while not visible: https://github.com/mongodb-js/compass-collection/pull/135 which is a performance hit.

            Assignee:
            Unassigned Unassigned
            Reporter:
            rhys.howell@mongodb.com Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: