Skip to content

[Bug?]: Hydration mismatch caused by expression in prop argument #2155

@samualtnorman

Description

@samualtnorman

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Error: Hydration Mismatch. Unable to find DOM nodes for hydration key: 0000000010000030000000
<p>foo</p>
    getNextElement dev.js:379
    Foo index.tsx:8
    memo dev.js:133
    runComputation dev.js:744
    updateComputation dev.js:726
    createMemo dev.js:272
    memo dev.js:133
    Foo index.tsx:7
    HMRComp @solid-refresh:25
    untrack dev.js:474
    HMRComp @solid-refresh:25
index.jsx:15:17

Expected behavior 🤔

no mismatch

Steps to reproduce 🕹

make a route with this code:

const debug = (value: any) => {
	console.log(`DEBUG:`, value)

	return value
}

const Foo = (props: { value: any }) => <>{
	debug(props.value) == null ? undefined : <p>foo</p>
}</>

export default () => {
	const a = () => undefined

	return <Foo value={a() && a()}/>
}

Context 🔦

I have also tested this with the latest version of SolidStart v1 and it's also a hydration error.

The server logs DEBUG: undefined while the client logs DEBUG: false which is very strange.

Your environment 🌎

System:
	OS: NixOS 26.05 (Yarara) x86_64
	CPU: 12th Gen Intel(R) Core(TM) i5-12500 (12) @ 5.90 GHz
Binaries:
	Node: 24.15.0 - /nix/store/q1r7qkrnbhakljr4j228v2yi2874jkl9-nodejs-slim-24.15.0/bin/node
	pnpm: 11.5.1 - /nix/store/npxsr4f0fvqb9r6s4miwapylwkzk416v-pnpm-11.5.1/libexec/pnpm/bin/pnpm.mjs
npmPackages:
	@solidjs/meta: 0.29.4
	@solidjs/router: 0.16.1
	@solidjs/start: 2.0.0-alpha.2
	@solidjs/vite-plugin-nitro-2: 0.1.0
	solid-js: 1.9.13
	vite: 7.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions