Description
Wherever possible, the content of the page should be controlled through React using props
and state
. Modifying the content using pure JS should be avoided.
The example that I found which is easy to fix is in the Editor
component:
p5.js-web-editor/client/modules/IDE/components/Editor.jsx
Lines 180 to 185 in e01efe8
The line number should be stored as a state and then passed down as a prop to the EditorAccessibility
component, which contains the 'current-line'
element.
It also seems like there is some wonky stuff going on throughout the uploader
, but I need to dig in there to see what the code is doing.
p5.js-web-editor/client/modules/IDE/actions/uploader.js
Lines 121 to 122 in dd433b7
p5.js-web-editor/client/modules/IDE/actions/uploader.js
Lines 53 to 56 in dd433b7