Notes, the multiple queries that are nested: For Labs 23
Opened this issue · 0 comments
newbi462 commented
See note to labs 21 as a related issue.
There are multiple queries being ran in the Note and Note Editing components. For each note that exists, it will run a query which will then run another query because of the code in the Note Editor will loop back to the Note component, indefinitely. The following files, listed below, are those which are affected.
src/components/Project/index.jsx
src/components/Project/NoteEditor/index.jsx
src/components/Project/NoteFeed/index.jsx
src/components/Project/NoteFeed/Note/index.jsx
Loop Description
* Note which loops to
* Note editor which loops to Note
* Note then loops to editor
* Forever…
FIX: Use state management and where needed use props. Remove multiple queries.
A related issue can be found here which also recommends refactoring to use Context API.