Bucklescript compile error after adding reason-loadable to project
Closed this issue · 3 comments
I tried successfully the parcel example, then I tried to add reason-loadable to my project and I unfortunately got stuck with this error:
We've found a bug for you!
/Users/robertosaccon/kelor-reason/node_modules/reason-loadable/src/ReLoadable.re 51:18-21
49 ┆ fetch()
50 ┆ /* Load module. */
51 ┆ |> load
52 ┆ /* Don't refine module now, just resolve new state, user should refine
module himself on render. */
53 ┆ >>= (data => self.send(Loaded(data)))
The value load can't be found
ninja: build stopped: subcommand failed.
What went wrong ? And where actually is load
defined ?
I have all the same package versions and settings as at the example, except I do not have any babel stuff as devDependencies (or do I need them for reason-loadable ???).
This issue is fixed with latest release. 👍
Update to latest version (bs-dynamic-import && reason-loadable) :
- bs-dynamic-import => 0.3.0
- reason-loadable => 0.4.0
Clean old BuckleScript artifact (bsb -clean-world) and compile.
You can look documentation/tests/examples, API is stable and i'll not make breaking change in future.
Tell me if you have any trouble ⚡️
It works as expected now. Thanks a lot.
Just one little question I have: why is the default delay set to 200ms ? Shouldn't it be as small as possible (0ms) for normal use case? And >0 just for demonstration purpose or maybe for some kind of throttling ?
Goal of this project is to mimic as close as possible "react-loadable" with Reason approach and ultimately, offer the same features.
Default delay of "react-loadable" is 200ms ;) . You can use 0 of course.