Conversation
| timeout: Duration? = null, | ||
| name: String? = null, | ||
| policy: SnapshotMutationPolicy<UiState> = structuralEqualityPolicy(), | ||
| retainedStateRegistry: RetainedStateRegistry = RetainedStateRegistry(), |
There was a problem hiding this comment.
WDYT to making this nullable (and default to null)?
Providing a default retainedStateRegistry is a bit of a foot gun, as it's so easy for devs to ignore. At least if we force people to provide a value, it's on them to track. If they don't provide a value, nothing is retained anyway.
There was a problem hiding this comment.
I'd be game for that or default to NoopStateRegistry, though I'm still not sure this API is necessary to expose at the top level as the only use case right now was automatic-cleanup.
There was a problem hiding this comment.
Yeah, this is basically just recreating NoopStateRegistry. Maybe this PR isn't needed: if people want to provide a real registry in tests then they're free to do so. Might be worth a doc call out though.
No description provided.