Page MenuHomePhabricator

[lib/web/native] implement asserting store after processing ops for both web and native
ClosedPublic

Authored by kamil on Nov 8 2023, 5:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 11:34 AM
Unknown Object (File)
Sun, Oct 27, 5:22 PM
Unknown Object (File)
Sat, Oct 26, 5:26 PM
Unknown Object (File)
Fri, Oct 11, 10:18 AM
Unknown Object (File)
Sep 28 2024, 9:30 PM
Unknown Object (File)
Sep 28 2024, 9:30 PM
Unknown Object (File)
Sep 28 2024, 9:30 PM
Unknown Object (File)
Sep 28 2024, 9:30 PM
Subscribers

Details

Summary

This is a pattern we used in the past, but now I want to make it work on all platforms.

Depends on D9759

Test Plan

Call assertUserStoresAreEqual and check the result:
web:

image.png (648×958 px, 116 KB)

native:
image.png (1×828 px, 654 KB)

Diff Detail

Repository
rCOMM Comm
Branch
refactors-us-to-ops
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Nov 8 2023, 5:44 AM
kamil added inline comments.
lib/reducers/user-reducer.js
139

UserStore here is probably redundant (look at screenshots)

149

I'll remove those in the next diff (here and line 125)

lib/utils/objects.js
122

it's safe, we don't call this function anywhere (in code before this diff), in this diff it's handled properly

native/redux/redux-debug-utils.js
6

I use this, not native/utils/alert.js on purpose.

This code can be called from the reducer, our own Alert calls store.getState() which cause crashes

This revision is now accepted and ready to land.Nov 8 2023, 6:21 AM