title: React Native computational heavy task
body: <p>Very simple and common use case, but I can't find satisfying answer.
  I have react native app which needs to store some data locally. I am using redux and redux-observables and Realm as a storage.</p>
  
  <p>What I need is: some action occur, let's say ADD_ITEM. I need to update UI with some payload (standard redux). Then I want to create/transform that payload to another piece of data and save that data into Realm (asynchronously). Whatever I try, it always lags UI (a lot).</p>
  
  <p>I tried to wrap that realm call into promise and use switchMap, but it's still slow.</p>
  
  <p>I haven't took a look at workers yet but they only accept strings, which is let's say much less usable for me.</p>
  
  <p>I can offload completely that computation to native background thread but that will be very uncomfortable and a lot of writing.</p>
  
  <p>Could async await help me? Of redux-saga? I feel like it's the same thing, not real async processing.</p>
  
  <p>Or am I using completely wrong libraries for this?</p>
  
  <pre><code>const insertOrderItem = (action$) =&gt;
      action$.ofType(Action.ADD_ORDER_ITEM)
          .switchMap(({ payload }) =&gt; Rx.Observable.fromPromise(
              new Promise((resolve, reject) =&gt; {
                  storage.insert(createObject(payload)
                  resolve({
                      type: "OPERATION_ADDED"
                  })
              })
          ))
  </code></pre>
  
  <p>In general, storing small piece of data to realm shouldn't be THAT much computational heavy but I feel like it's necessary to do this kind of jobs on background thread.</p>
  
  <p>Am I missing something?</p>
  
  <p>Thanks</p>