+2 votes
in Redux by
What is Subscribe? How you can use it in React App?

1 Answer

0 votes
by
Subscribe is a method which is used to subscribe data/state from Store automatically whenever there will any changes in state.

store.subscribe()

store.subscribe(() => {

  let storeData = store.getState();

  console.log(storeData);

});
...