solid icon indicating copy to clipboard operation
solid copied to clipboard

[Bug?]: SuspenseList hydration error

Open ryoid opened this issue 1 year ago • 2 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Current behavior 😯

Using <SuspenseList> causes hydration error. Not sure if this is a SolidStart issue.

Expected behavior 🤔

It should control order suspense are revealed.

Steps to reproduce 🕹

https://stackblitz.com/edit/github-fffd7t?file=src%2Froutes%2Findex.tsx

import { Suspense, SuspenseList, createResource } from 'solid-js';

export default function Home() {
  const [data] = createResource(() => ['red', 'blue', 'green']);
  return (
    <SuspenseList revealOrder="forwards">
      <Suspense>
        {/* Text node works */}
        {/* {data()} */}
        <div>{data()}</div>
      </Suspense>
    </SuspenseList>
  );
}

Context 🔦

Trying to control how Suspense are revealed.

Your environment 🌎

No response

ryoid avatar Apr 06 '24 16:04 ryoid

This is a SuspenseList issue, at least since that component is experimental.

lxsmnsyc avatar Apr 06 '24 22:04 lxsmnsyc

Yeah I suspected there are issues here. I will move this to Solid core.

ryansolid avatar Apr 08 '24 17:04 ryansolid