Ah it looks like I've done something wrong with my media query, but I can't quite see it. I can get pin-spacer to appear if I load the page in mobile view first then switch to desktop view. Very odd behavior. As you can see below I want to kill any pinning below 655px.
useEffect(() => {
// Scroll Scenes
ScrollTrigger.matchMedia({
'(min-width: 655px)': function () {
const scenes = gsap.utils.toArray('#mediaObject')
// maybe use dymanic height for pin/scroll ends?
const height = (scenes.length - 1) * 200 + '%'
// Scenes Timeline
const pinTl = gsap.timeline({
scrollTrigger: {
trigger: wrapRef.current,
pin: listRef.current,
start: 'center center',
end: `+=${height}`,
scrub: 1,
anticipatePin: true,
},
})
},
})
}, [])