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

Triangle spinner Component its broken. #152

Open
weillercarvalho opened this issue Mar 24, 2023 · 7 comments
Open

Triangle spinner Component its broken. #152

weillercarvalho opened this issue Mar 24, 2023 · 7 comments
Labels

Comments

@weillercarvalho
Copy link

When I pass this code in a React App created in Vite the Spinner don't render and the application breaks:
The code:

import { Triangle } from "react-loader-spinner";

export function Spinner() {
  return (
    <Triangle
      height="80"
      width="80"
      color="#4fa94d"
      ariaLabel="triangle-loading"
      wrapperStyle={{}}
      wrapperClassName=""
      visible={true}
    />
  );
}

The error:

Uncaught TypeError: dispatcher is null

The above error occurred in the <styled.svg> component:

O@http://localhost:5173/node_modules/.vite/deps/react-loader-spinner.js?t=1679623477709&v=32b9be25:3878:6
div
Triangle@http://localhost:5173/node_modules/.vite/deps/react-loader-spinner.js?t=1679623477709&v=32b9be25:4543:12
Spinner
RenderedRoute@http://localhost:5173/node_modules/.vite/deps/react-router-dom.js?v=bb418bfd:3029:7
Routes@http://localhost:5173/node_modules/.vite/deps/react-router-dom.js?v=bb418bfd:3373:7
Router@http://localhost:5173/node_modules/.vite/deps/react-router-dom.js?v=bb418bfd:3324:7
BrowserRouter@http://localhost:5173/node_modules/.vite/deps/react-router-dom.js?v=bb418bfd:3734:7
App@http://localhost:5173/src/components/App.tsx?t=1679623508342:31:39

@weillercarvalho
Copy link
Author

weillercarvalho commented Mar 24, 2023

I already tested the others spinners components and its working fine, except the triangle one.

@wolfpixels
Copy link

I think the infinity one is broken too, breaks for me from using examples code

@weillercarvalho
Copy link
Author

@isaacjoy97 yeah, I tested the infinity one and its broken too.

@mhnpd mhnpd added the bug label Apr 19, 2023
@mhnpd
Copy link
Owner

mhnpd commented Apr 19, 2023

@weillercarvalho Which version of react-script you are using?

@weillercarvalho
Copy link
Author

@mhnpd none, I'm using Vite not CRA

@weillercarvalho
Copy link
Author

pck.jsn deps.

"dependencies": {
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mui/icons-material": "^5.11.11",
"@mui/material": "^5.11.11",
"axios": "^1.3.4",
"framer-motion": "^10.5.0",
"material-ui-popup-state": "^5.0.4",
"popmotion": "^11.0.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-loader-spinner": "^5.3.4",
"react-router-dom": "^6.8.2",
"react-toastify": "^9.1.1",
"recharts": "^2.4.3",
"styled-reset": "^4.4.5"
},
"devDependencies": {
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-react-swc": "^3.0.0",
"sass": "^1.58.3",
"typescript": "^4.9.3",
"vite": "^4.1.0"
}

@MajdMaghamez
Copy link

tirangle is working for me but i found a minor bug when i copied the the code from the example the property responsible for setting the component class called wrapperClassName, when adding a class value to this property it was rendering "undefined" but if you change it to wrapperClass it worked this is the case for [ watch,, triangle, three dots ]

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

No branches or pull requests

4 participants