New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion]: An examples directory would be great #313
Comments
Hey awareness481, I think that's a great idea. I think the structure in this repo could be:
Something along those lines. There would probably need to be a shared Are you open to leading this effort? I could also provide code review on how to go about creating an http client that uses Regarding tags, I've gone ahead and added two tags:
But in general, I like to stay clear of theoretical terms such as Algebraic Data Types and Monad because it tends to scare people away sometimes. A design goal for this package has always been to use as little theoretical concepts as possible and make pragmatic tradeoffs in exchange for adoption and lowering learning curve. |
Late to the party, and I feel like the examples in the API docs are quite good already. Though I can understand that someone might need more contextually rich examples. I've been playing around with the library and checking out the source and am feeling quite comfortable enough to work on this if you feel this is necessary. |
This would be a much-appreciated contribution! |
Great, in that case I'm on it. Did you already happen to have something in mind with regards to how the examples should look? I'm thinking something to the likes of:
I'll keep in mind to leave the FP terms behind considering the design philosophy of this lib. |
Yes that's perfect. No need to have nested subprojects. If I understand correctly, each file is a self-contained example - which is great. I could contribute an |
More concrete examples would definitely be useful, especially for some of us who are new to the monad concepts and typescript. I've read through the wiki, watched the Railway video, etc. and overall I love the idea and approach... but I'm struggling to turn it into practical code. I'd also suggest that with each example, show the traditional (non neverthrow) example and then show how you would convert it to use neverthrow. I'd also add that start with simple examples and then have some examples build upon others. Some of the few examples I've seen seem like they're demonstrating multiple capabilities so I'm stuck figuring out what is required, what's extra, etc. |
An examples directory which some implementations of common usages would be great.
For example, I was trying to implement get a basic api fetch to give the library a test-ride but I couldn't get it working. Hopefully, if I ever get a hang of the library, I could contribute examples myself but that is not something I can do right now.
Btw, I wanted to say that the library looks great!
(P.S Since I'm here, could some github tags be added so the library is more discoverable? I couldn't recall its name once and I couldn't find it when I was searching for
functional
monad
etc)The text was updated successfully, but these errors were encountered: