mount method

Component mount(
  1. String sId
)

Returns a component that renders the server component with the ID sId, reusing the DOM nodes the server rendered for it.

When it mounts, the returned component takes the next instance that the server rendered with this ID. If none are left, it reports an error and renders nothing.

Implementation

Component mount(String sId) {
  assert(sId.startsWith('s${DomValidator.clientMarkerPrefixRegex}'));
  final name = sId.substring(2);
  return ServerComponent(serverComponents, name, key: GlobalKey());
}