Skip to content

solid/reactivity for observable #89

Closed
@voliva

Description

@voliva

Describe the bug
inline functions passed into observable from solid-js are maked as invalid as per solid/reactivity

To Reproduce

import { observable } from 'solid-js';

const Component = props => {
  const count$ = observable(() => props.count);

  ...
}

In this case the function is marked as invalid with This function should be passed to a tracked scope (like createEffect) or an event handler because it contains reactivity, or else changes will be ignored., but it is one of the intended ways of using observable if I'm not wrong (please correct me if it is wrong, I'm still new at SolidJS!)

  • I would be willing to contribute a PR to fix this issue

I saw the upcoming refactor at #87, along with the note on the docs which say that maintaining the current version is hard to do. I have some experience writing eslint plugins so I'd like to give it a try, but if you think it's not worth it I might just wait until the refactor is done.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions