Skip to content

solid 2.0.0-beta.0 Async signal does not show initialValue when resolved to the same value as initial value #2604

@mizulu

Description

@mizulu

Describe the bug

import { render } from '@solidjs/web';
import { createSignal, Loading } from 'solid-js';

function App() {
  const [count, setCount] = createSignal(async (v) => {
    return v
  }, 100);

  const [count2, setCount2] = createSignal(async (v) => {
    return v + 1
  }, 100);



  return (
    <div class="p-8">
      Count: <Loading>{count()}</Loading>

      <hr />

      Count2: <Loading>{count2()}</Loading>

    </div>
  );
}

render(() => <App />, document.getElementById('root')!);

Your Example Website or App

.

Steps to Reproduce the Bug or Issue

playground

Expected behavior

should show initial value

Screenshots or Videos

Image

Platform

.

Additional context

No response

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