Skip to content

Commit

Permalink
document replaceHydrateFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber authored Apr 23, 2018
1 parent ddcb3aa commit 8eb1537
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/gatsby/src/utils/api-browser-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,13 @@ exports.replaceHistory = true
* @param {object} $0.Root The "Root" component built by Gatsby.
*/
exports.wrapRootComponent = true

/**
* Allow a plugin to replace the ReactDOM.render function call by a custom renderer.
* This method receives the same parameters as ReactDOM.render takes.
* Note it's very important to call the provided callback after rendering, otherwise Gatsby will not be able to call `onInitialClientRender`
* @param {object} $0 element
* @param {object} $1 container
* @param {object} $2 callback
*/
exports.replaceHydrateFunction = true

0 comments on commit 8eb1537

Please sign in to comment.