Skip to content

Triangle spinner Component its broken. #152

@weillercarvalho

Description

@weillercarvalho

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions