Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

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

Closed
rahXephonz opened this issue Aug 20, 2022 · 2 comments

Comments

@rahXephonz
Copy link

rahXephonz commented Aug 20, 2022

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>,
);
@rahXephonz rahXephonz changed the title Vechai ui give an errors with vite configuration + React v18 Vechai UI configuration give an errors with vite configuration + React v18 Aug 20, 2022
@yuhang1995
Copy link
Contributor

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

@rahXephonz
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants