davidhu2000 / react-spinners

A collection of loading spinner components for react
https://www.davidhu.io/react-spinners
MIT License
3.11k stars 267 forks source link

V0.6 conflicts with react-konva #108

Closed Mosoc closed 3 years ago

Mosoc commented 5 years ago

Describe the bug Typescript-rewritten version 0.6 conflicts with react-konva. It will crash the browser even just import the component containing react-spinners.

It had no problem when using react-spinners@0.5.12.

To Reproduce Steps to reproduce the behavior:

import React from 'react';

import Canvas from './components/Canvas';

// import { BounceLoader } from 'react-spinners';

import Loading from './components/Loading'

import './App.css';

function App() {
  return (
    <div className="App">
      <Canvas />
    </div>
  );
}

export default App;

I create a repo with CRA to show it. https://github.com/Mosoc/react-spinners-v0.6-conflict-with-react-konva

Expected behavior

A canvas and the spinners

Screenshots

螢幕快照 2019-08-20 下午8 29 23

Additional context Using react-spinners in render and just import react-konva component as below does not cause any error.

import React from 'react';

import Canvas from './components/Canvas';

// import { BounceLoader } from 'react-spinners';

import Loading from './components/Loading'

import './App.css';

function App() {
  return (
    <div className="App">
      <Loading />
    </div>
  );
}

export default App;
issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.95. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

davidhu2000 commented 4 years ago

@Mosoc i'm still not 100% sure why this is happening, but the entire page freezes, which makes it hard to debug. I'm thinking possibly a GPU issue? Not really sure.

However, seems like if you use the new way to import a single loader, the issue seems to go away.

import BounceLoader from 'react-spinners/BounceLoader';