react-jobs icon indicating copy to clipboard operation
react-jobs copied to clipboard

ServerMode for different calls

Open Mr-Chilly opened this issue 7 years ago • 0 comments

Currently react-jobs (which is awesome btw - thank you very much!) can either work on the server or the client. Sometimes I find myself needing both! Would it possible to implement both at once? I could see usage as such:

const withJob({
    work: {
      server: () => 'do a jobbie',
      client: () => 'do a client jobbie'
    },
)}

or

const withJob({
    workServer: () => 'do a jobbie',
    workClient: () => 'do a client jobbie',
   
)}

shouldWorkAgain and jobstatus could then work in a similar way!

Mr-Chilly avatar Oct 29 '18 11:10 Mr-Chilly