acdlite / recompose

A React utility belt for function components and higher-order components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Put examples in the documentation

robbporto opened this issue · comments

It would be very nice to put some "real world" examples when explaining each method. Right now we mostly have only the signature of the method.

Agreed. I would be happy to take this on.

I agree that more examples should be added. We're using recompose heavily at work, and I have even written an article: Mastering React Functional Components with Recompose

If the examples in the article look good, then I could add them to the documentation, perhaps add a whole new Examples section.

To me the real value add when we stay with functions rather than classes is that testing becomes a lot easier. TDD is something that isn't to time consuming anymore, and therefore can be done because budgets for testing stay reasonably small.

Modular code and TDD is the only thing that gets you scalable codebases when you grow a business and start adding new devs at high pace.

I think the docs should therefore talk about this very important fact and have an example using e.g. Jest.