Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow app to adapt normalization on realtime #1411

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cballevre
Copy link
Member

@cballevre cballevre commented Oct 27, 2023

This PR is mainly to share my progress for the moment

* @returns {null} The component does not display anything.
*/
const RealTimeQueries = ({ doctype }) => {
const RealTimeQueries = ({ doctype, customNormalization }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Maybe we should have the ability to customize the "normalization" by event (create / update / delete).

Also, I would have done that outside of the normalization step, because here it's not a normalization anymore, it's a "business logical" before dispatching the result.

I didn't have a good naming yet, but :
customComputeDocumentFromRealtime can be more appropriated?

In fact, we already have this computeDocumentFromRealtime without knowing it... :

{ ...couchDBDoc, _deleted: true },

So this one cas ben the default on deleteEvent.

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.

None yet

2 participants