cujojs / most

Ultra-high performance reactive programming
MIT License
3.49k stars 206 forks source link

Include most.create in API docs #341

Open Rich-Harris opened 8 years ago

Rich-Harris commented 8 years ago

Follow up to Gitter discussion:

For folks like me who are coming to most.js without a reactive programming background, it can be a very steep learning curve. One of the things that would make it much easier to adopt streams incrementally (both as a mental concept and in a codebase) is an obvious escape hatch for when you need to write some dirty old-fashioned imperative code.

most.create seems to fit that bill perfectly, but it took me a very long time to discover it (and when I did, it was by accident – a throwaway remark in an unrelated thread). I propose adding it to the 'creating streams' section of the API docs, but with a health warning, perhaps something along the following lines:

For when you absolutely, positively have to add items to a stream manually. Using create should be considered an anti-pattern – there are usually more declarative ways to achieve the same end result – but it's a useful escape hatch for when you really need it

davidchase commented 8 years ago

had an idea about this thought i would run it by you guys... instead of adding create back into the API docs since it really lives outside of this repo now. A add modules table to the README similar to https://github.com/paldepind/flyd#modules

that list all of the current stream modules in https://github.com/mostjs and maybe even https://github.com/mostjs-community it gives both exposure and a nice way to add external modules into the README

thoughts?

briancavalier commented 8 years ago

@davidchase That's an interesting idea. Are you thinking we'd put the list directly in the README, or do you see it living in the wiki?

@Rich-Harris What do you think of that idea? Do you think it would have helped you discover @most/create?

davidchase commented 8 years ago

@briancavalier yeah i can see it in the README just because its right there... might be "better" found because its the 1st thing anyone sees when they are coming to a github repo.

I sometimes myself forget about the wiki feature 😞