All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.esm.components.client-only.client-only.js Maven / Gradle / Ivy

Go to download

Responsive and accessible React UI components built with React and Emotion

The newest version!
"use strict";
"use client";
import { jsx } from 'react/jsx-runtime';
import { useState, useEffect } from 'react';
import { Show } from '../show/show.js';

const ClientOnly = (props) => {
  const { children, fallback } = props;
  const [hasMounted, setHasMounted] = useState(false);
  useEffect(() => {
    setHasMounted(true);
  }, []);
  return /* @__PURE__ */ jsx(Show, { when: hasMounted, fallback, children });
};

export { ClientOnly };




© 2015 - 2025 Weber Informatics LLC | Privacy Policy