Describe the bug
An optimistically mounted component reveals its static text before applying its dynamic style.
The component returns a memo containing an element whose color is always either red or blue. Its style and an inner conditional read the same non-optimistic signal. While an action holds that signal's update, clicking Run reveals <div>Hello</div> with no style attribute. After two seconds it becomes <div style="color: blue;">Hello world</div>.
The issue is the unstyled intermediate element, not that the blue update waits for the action.
Your Example Website or App
https://s.olid.uk/id/cu5JVqDbSkWlmoERReb30Q
Steps to Reproduce the Bug or Issue
- Open the playground and click Run once.
- During the two-second action, observe that Hello appears in the default black color. Inspecting its element shows no
style attribute.
- When the action finishes, the text becomes Hello world and the blue style is applied.
Expected behavior
Either keep the child held until it can render consistently, or reveal it using the committed signal value (false, so red). Revealing the element without either declared color is inconsistent.
Screenshots or Videos
No response
Platform
- OS: Linux (WSL)
- Browser: Chromium 153.0.8010.12
- Solid: preview build
3ab71b0 (solid-js, @solidjs/web, and @solidjs/signals)
Additional context
Removing the component's createMemo wrapper or replacing its inner conditional text with static text avoids the unstyled intermediate element. The repro uses only signals, an optimistic signal, an action, and a real timer; Tailwind is disabled.
Describe the bug
An optimistically mounted component reveals its static text before applying its dynamic style.
The component returns a memo containing an element whose color is always either red or blue. Its style and an inner conditional read the same non-optimistic signal. While an action holds that signal's update, clicking Run reveals
<div>Hello</div>with no style attribute. After two seconds it becomes<div style="color: blue;">Hello world</div>.The issue is the unstyled intermediate element, not that the blue update waits for the action.
Your Example Website or App
https://s.olid.uk/id/cu5JVqDbSkWlmoERReb30Q
Steps to Reproduce the Bug or Issue
styleattribute.Expected behavior
Either keep the child held until it can render consistently, or reveal it using the committed signal value (
false, so red). Revealing the element without either declared color is inconsistent.Screenshots or Videos
No response
Platform
3ab71b0(solid-js,@solidjs/web, and@solidjs/signals)Additional context
Removing the component's
createMemowrapper or replacing its inner conditional text with static text avoids the unstyled intermediate element. The repro uses only signals, an optimistic signal, an action, and a real timer; Tailwind is disabled.