-
-
Notifications
You must be signed in to change notification settings - Fork 97
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
In some cases, it could be useful to store and display data in timed order. Like messages in the chat.
I tried to implement the receiving of new messages via custom redux action, but we know only ids of entities in updaters, so it is not possible to identify where to store entity.
export const conversationUpdated = (conversationUpdate: ConversationByOperator) => ({
type: RECEIVE_MUTATE_TYPE,
payload: conversationUpdate,
meta: {
schema: ConversationByOperatorResource.asSchema(),
updaters: {
[ConversationByOperatorResource.listShape().getFetchKey({})]: (
newConvId: string,
prevResults: { conversations: string[] | undefined },
) => ({
conversations: [...(prevResults?.conversations ?? []), newConvId],
}),
},
date: new Date(),
expiresAt: 189231293812939889,
},
});
Do you know how this can be done except manually sorting everything in react components?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request