Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error modals and slidesOvers (it does not work) #1363

Closed
Aryoam opened this issue Apr 24, 2022 · 1 comment
Closed

Error modals and slidesOvers (it does not work) #1363

Aryoam opened this issue Apr 24, 2022 · 1 comment

Comments

@Aryoam
Copy link

Aryoam commented Apr 24, 2022

  "dependencies": {
    "@headlessui/react": "^1.5.0",
    "@heroicons/react": "^1.0.6",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-icons": "^4.3.1",
    "react-router-dom": "^6.3.0"
  },
  "devDependencies": {
    "@vitejs/plugin-react": "^1.3.0",
    "autoprefixer": "^10.4.4",
    "postcss": "^8.4.12",
    "tailwindcss": "^3.0.24",
    "vite": "^2.9.2"
  }

There is a bug when using modals from tailwindui or headlessui, the modals or slidesovers are not executed at all.

Solution to the error, when creating a project with Vite the structure of the main is the following:

import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";

ReactDOM.createRoot(document.getElementById("root")).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

It is solved by changing the structure of the main.

import React from "react";
import ReactDOM from "react-dom";
import App from "./App";

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById("root")
);
@Aryoam Aryoam changed the title Error modals and slidesOvers Error modals and slidesOvers (it does not work) Apr 24, 2022
@RobinMalfait
Copy link
Member

Hey! Thank you for your bug report!
Much appreciated! 🙏

This is a React 18 related issue. Checkout #681 for more information.

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

No branches or pull requests

2 participants