Skip to content

在qiankun 子应用下listenStorageChange不生效 #2855

@OnionStu

Description

@OnionStu

这段Demo在qiankun的子应用下不生效

  const [count, setCount] = useSessionStorageState('use-local-storage-state-demo4', {
    defaultValue: 0,
    listenStorageChange: true,
  });

  return (
    <div style={{ marginBottom: '8px' }}>
      <button style={{ marginRight: '8px' }} onClick={() => setCount(count! + 1)}>
        count: {count}
      </button>
      <button onClick={() => setCount()}>Clear</button>
    </div>
  );
}```

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions