"Effects are meant primarily for side effects that read but . Instead, prefer using createMemo to compute new values that depend on other reactive values, so the reactive system knows what depends on what, and can optimize accordingly."
createEffect(() => {
options().length > 0 ? openSelect() : closeSelect()
})