Skip to content

Commit

Permalink
adding option for createBlockingRoot render, part of new concurrent m…
Browse files Browse the repository at this point in the history
…ode (#57)

* adding option for createBlockingRoot render, part of new concurrent mode

* 2.10.3
  • Loading branch information
frehner authored Oct 24, 2019
1 parent 632fa2d commit cafd9b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "single-spa-react",
"version": "2.10.2",
"version": "2.10.3",
"description": "A single spa plugin for React apps",
"main": "lib/single-spa-react.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions src/single-spa-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ function reactDomRender({opts, elementToRender, domElement, whenFinished}) {
return opts.ReactDOM.createRoot(domElement).render(elementToRender, whenFinished)
}

if(opts.renderType === 'createBlockingRoot') {
return opts.ReactDOM.createBlockingRoot(domElement).render(elementToRender, whenFinished)
}

if(opts.renderType === 'hydrate') {
return opts.ReactDOM.hydrate(elementToRender, domElement, whenFinished)
}
Expand Down

0 comments on commit cafd9b0

Please sign in to comment.