barbaPrefetch on links (like v1)

Created on 27 Nov 2019  Â·  3Comments  Â·  Source: barbajs/barba

The problem

I cannot get barba v1 prefetch behaviour to work

Description

Expected behaviour

I want to load links on hover instead when in viewpoint (v1 behaviour)

Actual behaviour

Barba loads dozen of links (because viewpoint loading)

Code To Reproduce Issue

Just the prefetch demo code, really:

import barba from '@barba/core';
import barbaPrefetch from '@barba/prefetch';

// tell Barba to use the prefetch module
barba.use(barbaPrefetch);

// init Barba
barba.init();

Environment

  • barba.js:

    • "@barba/core": "^2.8.0",

    • "@barba/prefetch": "^2.1.8"

  • Firefox 70 / Fedora Linux

Most helpful comment

Hi @S1SYPHOS,

Please, check this…
We really need more details / context / explanations to provide some help…
Another option is to join us on Slack.

Thanks

All 3 comments

Hi @S1SYPHOS,

Please, check this…
We really need more details / context / explanations to provide some help…
Another option is to join us on Slack.

Thanks

@S1SYPHOS,

Do not use @barba/prefetch.
By default v2 has the same hover/prefetch behaviour as v1…

Thank you very much, totally missed that - thought prefetching was optional with v2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pburdylo picture pburdylo  Â·  3Comments

pierredarrieutort picture pierredarrieutort  Â·  3Comments

iamtompickering picture iamtompickering  Â·  3Comments

hugobqd picture hugobqd  Â·  3Comments

Mellis84 picture Mellis84  Â·  3Comments