#1902·redux-saga

Blocks the entire UI

Author: DianaLaaCreated Jul 30, 2019Updated Jul 24, 2026

Steps to reproduce

function* watchStuff() {
  while (true) {
    try {
      console.log('watchStuff');
      yield call(delay, 1000);
    } catch (err) {
      console.log('error', err);
    }
  }
}

export default function* MySaga() {
  console.log('MySaga');
  // Execute in parallel
  yield all([
    fork(watchStuff),
    // fork(morestuffhere)
  ]);
};

const sagaMiddleware = createSagaMiddleware();
const middlewares = [ authMiddleware, sagaMiddleware ];

export const store = createStore(reducer,
  compose(
    applyMiddleware(...middlewares),
    offline({
      ...offlineConfig
    })
  )
);

sagaMiddleware.run(MySaga);

Description of the bug/issue

No matter what I do, my UI totally freezes up.

Steps to reproduce the bug/issue

See above.

Actual results

UI freezes up completely.

The Expected results

For starters, just log something every second without freezing up the UI.

Environment information

"@expo/samples": "2.1.1",
"@redux-offline/redux-offline": "^2.5.1",
"babel-plugin-inline-dotenv": "^1.3.3",
"dotenv": "^8.0.0",
"expo": "^32.0.0",
"moment": "^2.24.0",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-masked-text": "^1.12.0",
"react-native-paper": "^2.15.0",
"react-native-swipeable-row": "^0.8.1",
"react-navigation": "^3.8.1",
"react-redux": "^6.0.1",
"redux": "^4.0.1",
"redux-persist": "^5.10.0",
"redux-saga": "^1.0.5",
"uuid": "^3.3.2"