Skip to content

Does not seem to work with solidStart #51

@Sleepful

Description

@Sleepful

Tried the example from https://github.com/solidjs-community/solid-transition-group/blob/main/dev/kitchen-sink.tsx#L68 , it simply disappears

const SwitchCSS: Component = () => {
  const [page, setPage] = createSignal(1);

  createEffect(() => {
    console.log(page())
  })

  return (
    <>
      <button onClick={() => { setPage(p => ++p) }}>Next</button>
      <br />
      <Transition mode="outin" name="fade">
        <Show when={page()} keyed>
          {i => <div style={{ "background-color": getRandomColor(), padding: "1rem" }}>{i}.</div>}
        </Show>
      </Transition>
    </>
  );
};
.fade-enter-active,
.fade-exit-active {
  transition: opacity 0.5s;
}
.fade-enter,
.fade-exit-to {
  opacity: 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions