Skip to content

Instantly share code, notes, and snippets.

@yoshuawuyts
Last active March 5, 2018 11:19
Show Gist options
  • Save yoshuawuyts/076a1e74b00f6729eaaba28f7ae1d249 to your computer and use it in GitHub Desktop.
Save yoshuawuyts/076a1e74b00f6729eaaba28f7ae1d249 to your computer and use it in GitHub Desktop.
  • pass in LRU compatible thing into choo constructor
  • pass in LRU compatible thing into separate, nested cache constructors
  • add the .get() method to the cache
  • rename identity to .id
this.local.todos.map(todo => this.cache.get(Todo, Todo.id(todo)).render(todo))
@yoshuawuyts
Copy link
Author

this.local.todos.map(todo => this.state.cache(Todo, Todo.id(todo)).render(todo))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment