score:1

you have the access to to get state in the return function, throught redux-think. so you can do something like this

export function fetchdata() {
  return (dispatch, getstate) => {
    posts.on('value', snapshot => {
      dispatch({
        type: fetch_data,
        payload: snapshot.val()
      });
      // dispatch only if payload is different from the data in store
      //get store state data here getstate() will give you full state
      const data = getstate().pathtoyourdata
     // write a helper function let says aresame and compare both the values
      if (aresame(data, snapshot.val())) {
        dispatch({
        type: data_properties,
        payload: object.keys(snapshot.val()),
      });
    }

    });
  };
}

Related Query

More Query from same tag