import React, { useLayoutEffect, useRef } from 'react';
/** A helper component that sets document.title based on its contents. */
const DocumentTitle = props => {
    const ref = useRef(null);
    useLayoutEffect(() => {
        if (ref.current) {
            document.title = ref.current.textContent;
        }
    });
    return React.createElement("h1", { ...props, ref: ref });
};
export default React.memo(DocumentTitle);
//# sourceMappingURL=DocumentTitle.js.map