Skip to content

Conversation

@arturovt
Copy link
Member

This commit modifies the signatures of setState and patchState to return <void>. Previously, they were returning <T>, which was historically a mistake. This change also impacts the Store.reset method since it utilizes setState, resulting in Store.reset now also returning <void>.

setState is designed to update the state, and as such, the method itself should not generate a return value. Users should utilize getState to retrieve the latest value accordingly.

This commit modifies the signatures of `setState` and `patchState` to return `<void>`.
Previously, they were returning `<T>`, which was historically a mistake. This change also
impacts the `Store.reset` method since it utilizes `setState`, resulting in `Store.reset`
now also returning `<void>`.

`setState` is designed to update the state, and as such, the method itself should not generate
a return value. Users should utilize `getState` to retrieve the latest value accordingly.
@nx-cloud
Copy link

nx-cloud bot commented Mar 16, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 8fd33d7. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 6 targets

Sent with 💌 from NxCloud.

@bundlemon
Copy link

bundlemon bot commented Mar 16, 2024

BundleMon (Integration Projects)

Unchanged files (2)
Status Path Size Limits
Main bundles(Gzip)
hello-world-ng17/dist-integration/main.(hash)
.js
68.47KB +1%
Main bundles(Gzip)
hello-world-ng16/dist-integration/main.(hash)
.js
66.98KB +1%

Total files change +8B +0.01%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 8fd33d7 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 95.4% (0.0% change).

View more on Code Climate.

@arturovt arturovt marked this pull request as ready for review March 16, 2024 14:45
@arturovt arturovt merged commit ba23aab into master Mar 16, 2024
@arturovt arturovt deleted the fix/set-state-return branch March 16, 2024 14:45
@markwhitfeld markwhitfeld added this to the v.18.0.0 milestone Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants