0.0.11 • Published 5 years ago
carry-on-notify v0.0.11
carry-on-notify
carry-on
plugin that notifies subscribers when state changes.
Usage
import notifyListeners from "carry-on-notify";
import { Store } from "carry-on-react";
const notify = notifyListeners();
const subscriber = state => {
console.log('state changed', state);
};
const unsubscribe = notify.subscribe(subscriber);
const App = () => (
<Store plugins={notify.plugin}>
</Store>
);