Skip to content

Commit

Permalink
clarifying comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoff committed Oct 27, 2022
1 parent 3fa2e9a commit b2fac93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react-dom-bindings/src/server/ReactDOMFloatServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,10 @@ export function resourcesFromLink(props: Props): boolean {
}
}
if (props.onLoad || props.onError) {
// When a link has these props we can't treat it is a Resource but if we rendered it on the
// server it would look like a Resource in the rendered html (the onLoad/onError aren't emitted)
// Instead we expect the client to insert them rather than hydrate them which also guarantees
// that the onLoad and onError won't fire before the event handlers are attached
return true;
}

Expand Down

0 comments on commit b2fac93

Please sign in to comment.