-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implementation #1
Comments
🙋 I would love to look into this tonight (EST) (and maybe come back with questions) |
@jekrb sweet! 🎉 - don't be shy in asking questions; I'm here to help 😁 |
@jekrb checking up how things are going, got any questions about anything? |
@yoshuawuts I'm sorry I actually didn't get to this as I wanted to last night :( I underestimated how much I had on my plate at the time. If you don't mind I would still like to give this ago tonight |
cool, take your time! Just wanted to make sure you weren't stuck haha - I'm around tonight so post away with whatever questions you got C: |
@yoshuawuyts can you add some comments and links regarding the use of the placeholder template node in the playground code please? Thank you kindly. |
👌 sweet thank you! Made a gist here that I was planning on iterating on as I have ideas |
👋 hey @yoshuawuyts I've began working on the cacheElement portion of the module: https://github.com/jekrb/cache-element/blob/master/index.js Is this sort of what you were imagining it would be like? Also do you a have a preferred method of testing that the element is indubitably returned from a cache? I imagine thats why you've included the assert module. |
@jekrb awesome! Yeah that seems to go in the general right direction; nice work ✨ Could you perhaps open a PR so I can comment on specific lines with some remarks? Thanks heaps! |
@kristoferjoseph I think the The way I view stateful nodes is to provide a stable environment for another library to nest in. E.g. a library like D3 requires an escape hatch from DOM diffing tree because it manages all the updates to the DOM itself. All it needs is new state to be passed in when it changes, and a notification when it's loaded and unloaded. Adding caching on top is just nice for the diffing algorithm, but not exactly necessary. In comparison, regular nodes never need to deal with any of this state management, and thus only have to worry about caching to improve perf. Something else you might want to consider is that adding That is why for this library we've chosen a dual API: one for stateful nodes and one for regular nodes. I hope this makes sense; cheers! |
implemented, so closing now ✨ |
Implementing this should be fairly straight forward; most could be copied from https://github.com/yoshuawuyts/playground-stateful-choo/blob/master/index.js
If someone wants to implement this comment below; will guide and assist along the way where needed. If nobody steps up I'll build it out sometime this week. Cheers! ✨
The text was updated successfully, but these errors were encountered: