Comments (3)
Adding a console.trace
into scheduledPassiveEffects
give the following:
(NODE_ENV=production)
Trace: function () { [native code] }
at runningEffects (/Users/user/project/node_modules/react-blessed/src/fiber/fiber.js:213:7)
at /Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.production.min.js:132:384
at Object.exports.unstable_runWithPriority (/Users/user/project/node_modules/scheduler/cjs/scheduler.production.min.js:18:163)
at Ze (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.production.min.js:132:315)
at /Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.production.min.js:156:268
at Object.exports.unstable_runWithPriority (/Users/user/project/node_modules/scheduler/cjs/scheduler.production.min.js:18:163)
at Df (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.production.min.js:156:203)
at Bf (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.production.min.js:155:383)
at U (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.production.min.js:154:136)
at Ye (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.production.min.js:151:258)
(NODE_ENV=development)
Trace: function wrapped() {
var prevInteractions = exports.__interactionsRef.current;
exports.__interactionsRef.current = wrappedInteractions;
subscriber = exports.__subscriberRef.current;
try {
var returnValue = void 0;
try {
if (subscriber !== null) {
subscriber.onWorkStarted(wrappedInteractions, threadID);
}
} finally {
try {
returnValue = callback.apply(undefined, arguments);
} finally {
exports.__interactionsRef.current = prevInteractions;
if (subscriber !== null) {
subscriber.onWorkStopped(wrappedInteractions, threadID);
}
}
}
return returnValue;
} finally {
if (!hasRun) {
// We only expect a wrapped function to be executed once,
// But in the event that it's executed more than once–
// Only decrement the outstanding interaction counts once.
hasRun = true;
// Update pending async counts for all wrapped interactions.
// If this was the last scheduled async work for any of them,
// Mark them as completed.
wrappedInteractions.forEach(function (interaction) {
interaction.__count--;
if (subscriber !== null && interaction.__count === 0) {
subscriber.onInteractionScheduledWorkCompleted(interaction);
}
});
}
}
}
at runningEffects (/Users/user/project/node_modules/react-blessed/src/fiber/fiber.js:213:7)
at /Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:10959:14
at Object.unstable_runWithPriority (/Users/user/project/node_modules/scheduler/cjs/scheduler.development.js:255:12)
at commitRoot (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:10958:45)
at /Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:12401:5
at Object.unstable_runWithPriority (/Users/user/project/node_modules/scheduler/cjs/scheduler.development.js:255:12)
at completeRoot (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:12400:13)
at performWorkOnRoot (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:12329:9)
at performWork (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:12237:7)
at performSyncWork (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:12211:3)
from react-blessed.
That's quite strange indeed. Maybe they added some methods to the scheduler related to hooks and we did not add those.
Side question: does the function you give to useEffect in your case returns a unsubscribing function?
from react-blessed.
@Yomguithereal Some do, some don't. It seems somehow unrelated. You can find the code here (all three useEffect
cause the error)
from react-blessed.
Related Issues (20)
- readme shows incredible demo, but checked in demo missing rich content HOT 2
- Issue with Overmind state management HOT 1
- Keep the screen content after exit HOT 4
- useEffect hook with empty dependency array called twice HOT 2
- Routing issue
- Question about speed of the new renderer
- react-blessed not working with react-redux HOT 10
- Revamping Components - Typescript Types HOT 6
- Tear down with useEffect cleanup functions HOT 6
- console.log('screen was destroyed!') in 0.7.1 release HOT 3
- Suspense not working correctly with the react reconciler HOT 1
- no rendered output HOT 5
- Render Array of JSX elements? HOT 4
- `log` element not calling `setContent` on changes
- Confusion regarding styling text
- Example for Midnight Commander-like interface? HOT 4
- Getting the 'image' tag to work HOT 1
- TypeError: Invalid Version: undefined when trying to use react-devtools HOT 1
- Library prints devtools error message to console HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-blessed.