wufe / react-particles-js

Particles.js for React
https://rpj.bembi.dev/
MIT License
1.15k stars 106 forks source link

Error when using with nextjs #78

Closed AWR14 closed 5 years ago

AWR14 commented 5 years ago

getting the following error

uncaught (in promise) Error: Error react-particles-js - Status code 4 at XMLHttpRequest.a.onreadystatechange

Canvas.js (component)

import Particles from 'react-particles-js';

const Canvas = props => {
  return (
    <Particles params={{
      polygon: {
          enable: true,
          type: 'inside',
          move: {
              radius: 10
          },
          url: 'path/to/svg.svg'
      }
  }} />
  )
}

export default Canvas;

index.js (page)

import Canvas from '../components/Canvas'

const Home = props => {
  return (
    <Canvas />
  )
}

export default Home