Closed c0debreaker closed 6 years ago
Hi @c0debreaker! You're not using the style
parameter being passed into the function child of <Sticky>
.
{({ style }) => (
<Header style={{ background: "linear-gradient(#fff, #ddd)"}}
Without that style
parameter, it won't be sticky.
Got it. I also found out that style value from the parameter was
style {transform: "translateZ(0)"}
Thanks!
This is the basic example I copied. I was playing with the code to figure out how it works. However, I hardcoded the background style in the Header and the sticky didn't behave as expected anymore. Why is it doing that?