vechai / vechaiui

A set of high-quality accessible React UI components with the built-in dark mode using Tailwind CSS. Pre-designed headless ui and radix-ui.

Home Page:https://www.vechaiui.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vechai UI configuration give an errors with vite configuration + React v18

rahXephonz opened this issue · comments

Hello.

I'm interesting to use vechaiui. But when i've added a vechai configuration in tailwind config
the errors appears when running the app. Does vechai UI support React v18?

How to solve this?

image

package.json
image

my config tailwind

module.exports = {
  content: [
    "./*.html",
    "./src/**/*.{js,jsx,ts,tsx}",
    "./node_modules/@vechaiui/**/*.{js,ts,jsx,tsx}",
  ],
  plugins: [],
};
// app.tsx
import { BrowserRouter } from "react-router-dom";
import Navigation from "routes/Navigation";
import { QueryClient, QueryClientProvider } from "react-query";
import { VechaiProvider } from "@vechaiui/react";

const queryClient = new QueryClient({
  defaultOptions: {
    queries: {
      refetchOnWindowFocus: false,
      retry: false,
    },
  },
});

const App = () => {
  return (
    <BrowserRouter basename="/">
      <VechaiProvider>
        <QueryClientProvider client={queryClient}>
          <Navigation />
        </QueryClientProvider>
      </VechaiProvider>
    </BrowserRouter>
  );
};

export default App;
// main.tsx
import React from "react";
import { createRoot } from "react-dom/client";
// tailwind styles
import "styles/index.css";
import App from "./App";

type RootElement = Element | DocumentFragment;

const rootElement = document.getElementById("root");
const renderRoot = createRoot(rootElement as RootElement);

renderRoot.render(
  <React.Fragment>
    <App />
  </React.Fragment>,
);
commented

React 18 is not yet supported in the Vechai UI #73 (comment)

React 18 is not yet supported in the Vechai UI #73 (comment)

Hmm I see okay. Just downgrade my react application solved this issue now but I hope in the future there's have an update from vechai.