pao ramen
pao ramen
Explore posts from servers
SSolidJS
Created by pao ramen on 5/9/2024 in #support
scroll restoration
For some reason, when using solid-router, it does not do scroll restoration properly. I have a list of elements, I scroll to the bottom, I click on one element and when I hit the back button. Customers expect to go back to the bottom of that list, but for some reason it scrolls to the top. I've tried to debug it, and it does not call scrollToHash so I really don't know what else to look at. Thanks in advance!
16 replies
SSolidJS
Created by pao ramen on 3/5/2024 in #support
How do I "curry" a function with props?
I have a method "colorize" that receives two arguments: hue and shade. A component has a props.hue and I want to curry that function. I can't do it with createMemo since the accessor does not receive a parameter. How would you do it? ``` function colorize(hue, shade) { ... } function Component(props: Props) { const color = colorize.bind(null, props.hue) // not reactive! return <span color={color(100)}>hello</span> }
4 replies