corbt / next-frame

Returns a promise that resolves on the next animationFrame
BSD 2-Clause "Simplified" License
167 stars 15 forks source link

Help to use nextFrame with Redux Saga #7

Open jdvvaghelaoffice opened 5 years ago

jdvvaghelaoffice commented 5 years ago

Hie, I'm using axios in Redux saga. While calling multiple APIs, User Interaction freezes until got response from all called APIs. Can nextFrame() help me to resolve freezing issue? If yes then where can I use this method? In Saga file or anywhere else ?

Brqqq commented 5 years ago

It could help you. You can use it like any other async function in redux sagas.

import nextFrame from "next-frame";

function* someSaga() {
    yield call(nextFrame);
}