Comments (7)
Yeah the only way to see the error in my codepen example is to open upp the browser dev-tools. The code-pen console seems oblivious to anything but "console.log(...)"
I used code-pen just so I could provide a working example of the bug, but I'm happy to use any other tool you may suggest.
Thanks for pointing out that the docs are out of date!
from hyperapp.
@tunnckoCore jsbin is great for actual debugging 😄
But CodePen is nice to share things with. The console is weird is CodePen as well haha
from hyperapp.
Doc's are fine now, as far as I'm concerned at the moment anyway :) Nice swift work!
from hyperapp.
It comes from the docs. Third argument is data, fourth is the onError hook. app.js#L75
offtopic: I hate codepan.. how can i see the mentioned error? console shows nothing.
Never like it, never will - design, feel and all.
from hyperapp.
Thanks for pointing out that the docs are out of date!
@zaceno thanks, we didn't notice that.
from hyperapp.
@zaceno Thanks for reporting, gonna fix those doc-doc-docs!
Correct signature should be:
waitThenAdd: (model, msg, data, error)
For the record, if you update the pen as follows, here's what happens.
const effects = {
waitThenAdd: (model, msg, data, error) => {
console.log(data) // => HTML event since onclick=${msg.waitThenAdd}
msg.toggle()
wait(1000)
.then(msg.add)
.then(msg.toggle)
.then(() => {error('just a message')}) // => throws the error with the specified message
}
}
from hyperapp.
@zaceno Fixed, see https://github.com/hyperapp/hyperapp#effects
Let me know if that looks good to you. I think we're done here, so I'll close, but feel free to reopen if you feel this is still incomplete.
/cc @tunnckoCore
from hyperapp.
Related Issues (20)
- A way to insert raw Html HOT 1
- TypeError: can't access property 0, newSubs is null, when setting the state to undefined. HOT 4
- Issue with null-vnodes HOT 1
- prevent rerender node HOT 2
- The dispatch initializer ends in an endless loop on init when dispatching any action HOT 7
- Injected classes gets removed when using object/array to define class props HOT 1
- hyperapp version HOT 3
- Memo Data Gotcha HOT 5
- Confusing doc for actions -> wrapped actions HOT 5
- Passing arguments to init HOT 4
- [Question] Headless mode is still possible? HOT 1
- Destroying a child app HOT 8
- @hyperapp/html: use a Proxy? HOT 9
- Actions returning other Actions HOT 5
- Compile template tag to hyperscript HOT 17
- A challenge to hyperapp community HOT 1
- Has 2.0 been dropped from development? HOT 3
- oldSub[2] is not a function HOT 3
- Cannot read properties of null (reading 'length') HOT 5
- Unlikely Use Case bug in HTML and SVG Packages HOT 9
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 hyperapp.