omniscientjs / immstruct

Immutable data structures with history for top-to-bottom properties in component based libraries like React. Based on Immutable.js
374 stars 21 forks source link

Are .on and .observe the same thing? #62

Closed jtremback closed 9 years ago

jtremback commented 9 years ago

Looks like it, from the todoMVC app. Docs make no mention of .on.

dashed commented 9 years ago

They're not the same thing.

.on is for Structure instances which extends an eventemitter.

.observe is an API reserved for "reference cursors" created with structure.reference(path);

mikaelbr commented 9 years ago

I added clearer distinction in #64

mikaelbr commented 9 years ago

Fixed in #76