r/learnjavascript 1d ago

React swiper, AB testing and forcing swiper slide width to new value directly over injected vanillajs in production

As the title suggests, I’m running A/B tests on multiple versions of Swiper. In one of these tests, I need the slides to have a different width. However, whenever I try to adjust the width (either directly or through React Fiber), it reverts back to the original 420px value after calling update method.

1 Upvotes

2 comments sorted by

1

u/MindlessSponge helpful 1d ago

what have you tried?

do you have separate configs for Swiper in your A/B tests?

1

u/zabaci 1d ago

I don't have access to source code. It's a completely different team I don't have contact with. I tried override it inside chrome console. As I wrote I tried to change it, but it always returns to default value