SolidJSS
SolidJSโ€ข3y agoโ€ข
5 replies
oneiro

solid-transition-group leads to reactivity warning inside test cases

Hey folks,

we just started using solid-transition-group and as soon as the <Transition />-component is present, all of our test cases start throwing the computations created outside a createRoot or render will never be disposed- error.

If we remove the transition the error disappears. Any idea what could cause this?

The component in question looks like this:

const Snackbar = () => {
  return (
    <Transition
      onEnter={(element, done) => {
        const animation = element.animate(
          [
            { transform: "translate(-50%, -100%)" },
            { transform: "translate(-50%, 0%)" },
          ],
          {
            duration: 400,
          }
        );
        animation.finished.then(done);
      }}
      onExit={(element, done) => {
        const animation = element.animate(
          [
            { transform: "translate(-50%, 0%)" },
            { transform: "translate(-50%, -100%)" },
          ],
          {
            duration: 400,
          }
        );
        animation.finished.then(done);
      }}
    >
      <Show when={toastSelectors.firstToast()}>
        {(firstToast) => (
          <Toast
            id={firstToast().id}
            kind={firstToast().kind}
            message={firstToast().message}
          />
        )}
      </Show>
    </Transition>
  );
};


Thanks in advance
Was this page helpful?