File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
packages/gatsby/src/utils Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,14 @@ exports.wrapRootComponent = true
7575
7676/**
7777 * Allow a plugin to replace the ReactDOM.render function call by a custom renderer.
78- * This method receives the same parameters as ReactDOM.render takes.
79- * Note it's very important to call the provided callback after rendering, otherwise Gatsby will not be able to call `onInitialClientRender`
80- * @param {object } $0 element
81- * @param {object } $1 container
82- * @param {object } $2 callback
78+ * This method takes no param and should return a function with same signature as ReactDOM.render()
79+ * Note it's very important to call the callback after rendering, otherwise Gatsby will not be able to call `onInitialClientRender`
80+ * @example
81+ * exports.replaceHydrateFunction = () => {
82+ * return (element, container, callback) => {
83+ * console.log("rendering!");
84+ * ReactDOM.render(element, container, callback);
85+ * };
86+ * };
8387 */
8488exports . replaceHydrateFunction = true
You can’t perform that action at this time.
0 commit comments