-
Notifications
You must be signed in to change notification settings - Fork 157
Conversation
@@ -1,5 +1,6 @@ | |||
import { storiesOf } from '@storybook/vue'; | |||
import { action } from '@storybook/addon-actions'; | |||
import { createInfiniteHitsSessionStorageCache } from 'instantsearch.js/es/lib/infiniteHitsCache'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we reexport createInfiniteHitsSessionStorageCache
from vue-instantsearch
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an interesting idea, but we don't do that for now for other things like router, I'm not sure if that can have a bundle size impact?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it'll have a bundle size impact but it's worth trying.
On a UX perspective, it doesn't make sense to import something from a library's dependency (you're not even aware that you use instantsearch.js
when you use vue-instantsearch
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's do it in a stacked PR? There's argument for exposing the connectors etc. too, so let's join that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess not in a stacked PR but a separate PR as in something like chore: reexport things from IS.js...
If we're going to reexport stuff, then we'd better do them altogether with doc changes.
What do you think?
* feat(InfiniteHits): support cache * test: add test accepting a cache prop
This PR adds support for cache.
related to: algolia/instantsearch#4431
It basically accepts a new prop
cache
and pass it to the connector.I've added a story to test sessionStorage cache in action.