Skip to content

Instantly share code, notes, and snippets.

@Yamo93
Created October 31, 2020 21:59
Show Gist options
  • Save Yamo93/a2c2843f70063ed3d6050cea7848e07e to your computer and use it in GitHub Desktop.
Save Yamo93/a2c2843f70063ed3d6050cea7848e07e to your computer and use it in GitHub Desktop.
Pseudo code for pub-sub pattern
const subscribers = {
onUserUpdate: [callbackFunction, anotherCallbackFunction],
onUserLogin: [callbackFunction, anotherCallbackFunction]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment