js-coroutines
GitHub
I had a Eureka moment earlier after reading something very interesting on dev.to - gave me an idea - and wow did i...
For further actions, you may consider blocking this person and/or reporting abuse
GitHub link is 404?
Sorry, late night, forgot to make the repo public...
So github is now public and I've improved the docs and included es6 version in the dist folder of the npm package.
This library has been updated to support JSON and a whole bunch of helper Async functions to make coding easier. There is more detail available in this article: dev.to/miketalbot/60fps-javascript...
Do you expect this would work with React Native?
I wouldn't have thought so the way it is at the moment as it relies on
requestIdleCallback
which is a browser thing. Though clearly it could be adapted to work in that environment either by estimating the time per frame (using whatever the RN tick is) or if RN has actually got something to tell us.I have only dabbled in React Native - would this be useful do you think? Very happy to do a version for it if it would help?
We have a ton of data we must manipulate client side to put in charts. Parallel animations have been a challenge. Something like
js-coroutines
would potentially provide a much better user experience.Ok cool - I looked after your comment. It appears that I can do something with the timers. I'm just not sure how much time it will need when reverting to native after the JS. But definitely looks possible. I'm excited to try if you'll find it useful. Will give it a look.
Ok, it works :)
js-coroutines 2.1.40 - very recent version of React Native (but I think I've polyfilled requestIdleCallback for older versions)
Sweet! I think I'll be in a place to test this out next week. 👍
404 on the github link.
Now made it public - link is github.com/miketalbot/js-coroutines
This is really sweet! Might be asking for a few of us here, but do you think you could possibly delve into how this works, and how you came to these answers?
Good point, I definitely will write on that. I'm going to add JSON parsing as a coroutine and then when that's done (hopefully tomorrow) I'll write about the core principles. Should have done it at the start!
Awesome, can't wait to read it!
Hey Josh
I've posted the updated library info and the description of the process here.
M
Hey Mike, that is a brilliant write up, super in-depth and well explained!
Thank you again for this.
That is impressive! Well done man
This is really really cool. I'm sure I'll find use-cases for it in the next future. Probably sooner than later for chessroulette.org 🤔