SolidJSS
SolidJSโ€ข3y agoโ€ข
11 replies
north korean supermarket

How to write an effect that depends on a store property?

I would like to scroll to the bottom of the list every time a list changes.
My list is a property of a store. I would like to write something like
  createEffect(
    on([props.list], () => {
      scrollIntoView();
    })
  );

but on only accepts type Accessor. Is there another way to do this?
Was this page helpful?