Reference docs should be made comprehensive #793
Replies: 1 comment 2 replies
-
|
Thank you for the lengthy post 🙏 I'm always trying to add more documentation, but it's hard from my perspective, since I don't run into issues like you do (meaning novice people) so I can't know what the shortcomings of the reference are. I do believe that the path forward is that when people run into issues and have solutions, they contribute that back to the documentation. In this case, it would be you who creates a PR with the additions/changes. This (discussions) is a good platform too to express these issues, but it's not where people search in the first place. For more mature languages, the other platforms (Stack Overflow for example) have a lot of documentation on how to do things which might not be in the official documentation, unfortunately Mint is just not there yet. So in short, I do know that there are missing things in the documentation, but I don't know what they are 🙂 and I hope people will contribute in the long run. I'll update the documentation of the specific issues you mentioned or if you are willing a PR would be the best. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I real feel that the Reference lacks some important details about the language's concepts. For e.g. yesterday I was exploring https://github.com/mint-lang/mint-realworld and while going through
https://github.com/mint-lang/mint-realworld/blob/5d7da20a587c365aed146e6420e3c083a9cf2c11/source/Pages/SignUp.mint
I was trying to understand how on Sign Up if any errors are encountered will be rendered by following line
https://github.com/mint-lang/mint-realworld/blob/5d7da20a587c365aed146e6420e3c083a9cf2c11/source/Pages/SignUp.mint#L33
So I checked that the component is defined as an
asynccomponent (L1). So I checked the docs at https://mint-lang.com/reference/components/async-components but still couldn't make it because the docs illustrate following exampleThat shows that
Greetercomponent will render ifshownstate will be found true. That state is updated on click of "Show Greeting!" btn which is part ofMaincomponent. So to make theGreetercomponent show upMaincomponent will need to re-render after the btn is clicked so that theif showncan evaluate to true and thus renderGreetercomponent.But the
Pages.SignUpcomponent inmint-realworlddoesn't employ any such conditional approach to render following part:So I was exploring here and there on Website Home, Tutorial and Reference and while doing that I found following:
With that information when I again checked
Pages.SignUpcomponent in it I foundForms.SignUpconnected. So checkingForms.SignUpstore at https://github.com/mint-lang/mint-realworld/blob/5d7da20a587c365aed146e6420e3c083a9cf2c11/source/Forms/SignUp.mint I could connect the missing links i.e. whenForms.SignUpstore updates it's statestatus, then the components in which it is connected, which in present discussion isPages.SignUp, then that component will re-run itsrenderfunction and thus theGlobalErrorscomponent should get a chance to render.So my point is that the details are there but they are scattered in Tutorial or Reference or the Website's main page. I think Reference should be comprehensive. Tutorial is for getting started. But when one needs to dive deep s/he would ultimately prefer to check the Reference and API
One more example: In a discussion I opened #791 (comment) @gdotdesign shared about the shadowing technique for
letassigments. But checking the Reference I couldn't find any dedicated section forlet. If we follow the Reference in sequence then the first time you come acrossletis in https://mint-lang.com/reference/array but without any mention about what is its purpose. Then in https://mint-lang.com/reference/state-management an important piece is shared thatletassignment cannot be changed.Assignments are a critical part of the logic and
letbeing the primary means I think it needs its own section explaining its usage and behavior. Ofcourse in https://mint-lang.com/reference/blocks some important information is available, but on the behavior thatlet's assignment cannot be changed, still if there is need to change, then whether it is possible or not, if possible how to do that etc should be explained. For e.g. in the referenced discussion my need was to push items to an Array and get hold of that updated Array so that it can be again operated on by further logic.That said neither https://mint-lang.com/tutorial/language/arrays nor https://mint-lang.com/reference/array doesn't demonstrate Array modifications. I believe modifying Arrays (actually transforming Arrays in Functional Programming terminology like @gdotdesign shared in #791 (comment)) is an important part while building logic on them and thus the docs should illustrate that as well.
Hoping that this feedback for documentation will be taken on a positive note and accordingly consideration will be given to improve the documentation esp keeping in mind the developers, like me,
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions