Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

The service_name.store.records is not updating just replace the last item #27

@hugomosh

Description

@hugomosh

Steps to reproduce

I have one project ReactNative and Feathers with a service lets say service_logs

Behavior

  1. I create a new service_log: SERVICES_DEVICE_LOGS_CREATE_PENDING
  2. Service create the device: SERVICES_DEVICE_LOGS_CREATE_FULFILLED
  3. But in the service_logs.store.records (SERVICES_DEVICE_LOGS_STORE) I get the last item "replace" for the new one. See the image:

captura de pantalla 2017-08-15 a la s 15 39 15

It should keep the full list, not replacing the last item. You see 301,299,298,... When it should be 301,300,299,298,...

I do something like this to connect RealTime

if (s == 'device_logs') {
    options = {
       uuid: true ,
      sort: Realtime.multiSort({created_at: -1})
    }
  }
  const serviceRT = new Realtime(serviceN, options);

  serviceRT.on('events', (records, last) => {
    store.dispatch(services[s].store({connected: serviceRT.connected, last, records}));
  });
  RealTimesV[s] = serviceRT;

And then I do an action to connect to the service.

I am not sure if this weird behavior is on the server side or the real time.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions