Bitnoise / react-scheduler

MIT License
348 stars 93 forks source link

ERROR - null is not an object (evaluating 'dispatcher.useMemo') #148

Open xlautrixlx opened 2 months ago

xlautrixlx commented 2 months ago

Hey there,

please keep in mind that Iam an absolutely beginner in React and still learning.

I tried to install react-scheduler and created a extra component to insert it into a project, but all of a sudden Iam greeted by a complete red site with 3 times of the same error, which is:

ERROR null is not an object (evaluating 'dispatcher.useMemo') useMemo@http://localhost:3000/static/js/bundle.js:2974:24 ji@http://localhost:3000/static/js/bundle.js:48983:61 renderWithHooks@http://localhost:3000/static/js/bundle.js:23039:31 mountIndeterminateComponent@http://localhost:3000/static/js/bundle.js:27010:32 callCallback@http://localhost:3000/static/js/bundle.js:13295:23 dispatchEvent@[native code] invokeGuardedCallbackDev@http://localhost:3000/static/js/bundle.js:13339:33 invokeGuardedCallback@http://localhost:3000/static/js/bundle.js:13396:40 beginWork$1@http://localhost:3000/static/js/bundle.js:33294:32 performUnitOfWork@http://localhost:3000/static/js/bundle.js:32542:27 workLoopSync@http://localhost:3000/static/js/bundle.js:32465:26 renderRootSync@http://localhost:3000/static/js/bundle.js:32438:23 performConcurrentWorkOnRoot@http://localhost:3000/static/js/bundle.js:31833:92 workLoop@http://localhost:3000/static/js/bundle.js:39873:46 flushWork@http://localhost:3000/static/js/bundle.js:39851:26 performWorkUntilDeadline@http://localhost:3000/static/js/bundle.js:40088:46

Here is my project structure and the files I created or edited:

The App.tx is just: import React from 'react'; import './App.css'; import "@bitnoi.se/react-scheduler/dist/style.css"; import { Component } from "./SchedulerComponent";

function App() { return (

); } export default App;

Explorer in VSCode

SchedulerComponent.tsx: https://pastebin.com/drhZKSJ2

EDIT: Saw the posting about the newer react version on #115 , but this didn't help. I verified it by looking into package-lock.json, the version for "@types/react": "^18.2.0", "@types/react-dom": "^18.2.0", "react": "^18.2.0", "react-dom": "^18.2.0",

CompileZero commented 3 weeks ago

Yes, I'm facing the same issue. The library works fine on Version 0.2.1, but as soon as its upgraded to 0.3.0 or above, it breaks. To the authors, any help would be appreciated since we're quite affirmative on using this library for our project.! Thanks...