Skip to content

fix(deps): bump @stream-io/state-store to 1.4.0 - #4048

Merged
isekovanic merged 3 commits into
developfrom
chore/bump-state-store-1.4.0
Dec 3, 2026
Merged

isekovanic merged 3 commits into
developfrom
chore/bump-state-store-1.4.0

Conversation

@oliverlaz

@oliverlaz oliverlaz commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Bumps @stream-io/state-store from ^1.3.1 to ^1.4.0 (release).

1.4.0 changes only the React bindings (GetStream/js-toolkit#69):

  • useStateStore(store) can be called without a selector and returns the whole state.
  • After an update that left the selection unchanged, the selector form no longer runs the selector and the comparison again on every re-render. In a benchmark, re-renders after such an update were 1.6–2x faster with a selector that does real work.

The selector overloads are unchanged.

  • Range bumped in package/package.json and examples/SampleApp/package.json.
  • yarn.lock: yarn dedupe @stream-io/state-store makes every range (^1.2.0 and ^1.3.1 from stream-chat and @stream-io/i18n, and ^1.4.0) resolve to one 1.4.0 copy, so the bundle doesn't get two.

yarn typecheck in package/ passes.

Selectors dropped in favor of the selector-less hook

7 call sites now call useStateStore(store) instead of passing a selector that returned the whole state. A selector-less call returns the store value itself and re-renders on every update, so the behavior is unchanged. The only difference is one extra render when an update sets every value to what it already was. The selector constants and the type imports that only they used are removed.

Selectors that pick one key of a one-key state, such as ({ attachments }) => ({ attachments }), are kept. They keep the component tied to that key if the state type gains more keys later.

Checks: yarn typecheck passes, eslint and prettier are clean on the changed files, and jest passes (1,382 passed, 13 in already-skipped suites).

Changed: useMessageComposerHasSendableData, useSupersededChannelSwap and ScheduledMessageSaveButton (editingAuditState, read only to re-render on every composer change); useWSConnectionState and useNetworkConnectionState (return the whole state); useBottomSheetState and useAttachmentPickerState (local hooks that return their store's whole state, so callers still destructure the same fields).

@getstream-metis

Copy link
Copy Markdown

👋 Hi Oliver, want a second pair of eyes on this?

I'm Jeffery, Stream's review agent. I look for bugs, regressions, missing tests and slow paths, and I only post findings I've checked against the code.

  • Review this PR

Or comment /jeffery review. I'll stay quiet unless you ask.

@oliverlaz
oliverlaz requested a review from isekovanic December 3, 2026 13:18
oliverlaz and others added 2 commits December 3, 2026 14:34
This reverts commit 0823c75.

State reads stay declared at the call site: every useStateStore call
passes a selector naming the fields it reads, and an explicit identity
selector where the whole state is needed. The selector-less form also
widened useAttachmentPickerState and useBottomSheetState to re-render
on every change to their stores.

AGENTS.md now records the rule.
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

SDK Size

title develop branch diff status
js_bundle_size 2210 KB 2210 KB 0 B 🟢
ai_components_size 353 KB 353 KB 0 B 🟢
a2ui_size 103 KB 103 KB 0 B 🟢

@isekovanic
isekovanic merged commit e3cfc74 into develop Dec 3, 2026
22 checks passed
@isekovanic
isekovanic deleted the chore/bump-state-store-1.4.0 branch December 3, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants