SamyPesse / draft-js-prism

Code highlighting for DraftJS using Prism
http://samypesse.github.io/draft-js-prism/
Apache License 2.0
274 stars 36 forks source link

Component's children should not be mutated. #9

Closed Lenic closed 7 years ago

Lenic commented 8 years ago

It throw error as follow on first loaded.

dist.js:17655 Warning: Component's children should not be mutated.
    in pre
    in div (created by DraftEditorContents)
    in DraftEditorContents (created by DraftEditor)
    in div (created by DraftEditor)
    in div (created by DraftEditor)
    in div (created by DraftEditor)
    in DraftEditor (created by PrismEditorExample)
    in div (created by PrismEditorExample)
    in div (created by PrismEditorExample)
    in PrismEditorExampleprintWarning 
    @ dist.js:17655warning 
    @ dist.js:17679handleElement 
    @ dist.js:28320onMountComponent 
    @ dist.js:28326callHook 
    @ dist.js:33719emitEvent 
    @ dist.js:33731onMountComponent 
    @ dist.js:33963mountComponent 
    @ dist.js:37561mountChildren 
    @ dist.js:36297_createInitialChildren 
    @ dist.js:31407mountComponent 
    @ dist.js:31232mountComponent 
    @ dist.js:37555performInitialMount 
    @ dist.js:30001mountComponent 
    @ dist.js:29876mountComponent 
    @ dist.js:37555mountChildren 
    @ dist.js:36297_createInitialChildren 
    @ dist.js:31407mountComponent 
    @ dist.js:31232mountComponent 
    @ dist.js:37555mountChildren 
    @ dist.js:36297_createInitialChildren 
    @ dist.js:31407mountComponent 
    @ dist.js:31232mountComponent 
    @ dist.js:37555mountChildren 
    @ dist.js:36297_createInitialChildren 
    @ dist.js:31407mountComponent 
    @ dist.js:31232mountComponent 
    @ dist.js:37555performInitialMount 
    @ dist.js:30001mountComponent 
    @ dist.js:29876mountComponent 
    @ dist.js:37555mountChildren 
    @ dist.js:36297_createInitialChildren 
    @ dist.js:31407mountComponent 
    @ dist.js:31232mountComponent 
    @ dist.js:37555mountChildren 
    @ dist.js:36297_createInitialChildren 
    @ dist.js:31407mountComponent 
    @ dist.js:31232mountComponent 
    @ dist.js:37555performInitialMount 
    @ dist.js:30001mountComponent 
    @ dist.js:29876mountComponent 
    @ dist.js:37555performInitialMount 
    @ dist.js:30001mountComponent 
    @ dist.js:29876mountComponent 
    @ dist.js:37555mountComponentIntoNode 
    @ dist.js:35625perform 
    @ dist.js:40628batchedMountComponentIntoNode 
    @ dist.js:35647perform 
    @ dist.js:40628batchedUpdates 
    @ dist.js:34063batchedUpdates 
    @ dist.js:38324_renderNewRootComponent 
    @ dist.js:35841_renderSubtreeIntoContainer 
    @ dist.js:35922render 
    @ dist.js:359431.../ 
    @ dist.js:241s 
    @ dist.js:1e 
    @ dist.js:1(anonymous function) 
    @ dist.js:1
vendors.js:28813

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
jjkavalam commented 8 years ago

@Lenic Kindly check if https://github.com/facebook/draft-js/pull/610 is related to this issue. If so, it may have been gotten fixed in draft-js

mxstbr commented 7 years ago

This was fixed upstream, update your DraftJS version if you're still experiencing this issue!