Same as https://github.com/facebook/react/issues/10103, but for the server renderer. You can look at implementation in https://github.com/facebook/react/pull/11168 and do something very similar in `ReactPartialRenderer.js`.
return typeof type === 'string'
    ? type
    : typeof type === 'function' ? type.displayName || type.name : null;
}
const VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; 
const validatedTagCache = {};
function validateDangerousTag(tag) {
  if (!validatedTagCache.hasOwnProperty(tag)) {
    invariant(VALID_TAG_REGEX.test(tag), 'Invalid tag: %s', tag);
    validatedTagCache[tag] = true;
  }
}
const processStyleName = memoizeStringOnly(function(styleName) {
  return hyphenateStyleName(styleName);
});
function createMarkupForStyles(styles): string | null {