import React, { useEffect, useState } from 'react';

export const SkipSSR = React.memo((props) => {
    const [ready, setReady] = useState(false);
    useEffect(() => {
        setReady(true);
    }, []);

    if (ready) {
        return props.children as any;
    }
    return null;
});
