0

I am doing a React app and I want to do my in memory data models with es6 modules and EventEmitter. Wondering if it is recommended to use a singleton.

Also I heard that this event emitter is the one to use.

user2355058
  • 211
  • 3
  • 15

1 Answers1

0

The answer is yes! Models in a module based front end should be singletons! Otherwise their data is not persistent across the various imports!

user2355058
  • 211
  • 3
  • 15