SolidJSS
SolidJSโ€ข3y agoโ€ข
17 replies
Bersaelor

solid-eslint warning about event handlers

So, I get the eslintsolid/reactivity warning when I use reactive props in event handlers:
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.

  createEffect(() => {
    const wS = waveSurfer();

    if (wS) {
      wS.on('play', () => {
        if (props.currentArticle)
          trackStartPlayback(props.currentArticle);
      }


How else would you all handle this?
Was this page helpful?