r/javascript • u/Goldwerth • Sep 18 '17
Modern JavaScript Cheatsheet
https://github.com/mbeaudru/modern-js-cheatsheet5
u/KapKaraKalem Sep 18 '17
I don't understand why you call it javascript for react since basicly it is new updates from javascript world for old javascript coders. I realy miss some concept and found here. Thank you 👍🏻👍🏻
3
u/Goldwerth Sep 19 '17
It was a mistake, at first I wrote such a doc for friends and then changed my idea but I forgot to change the table of contents accordingly.
Thanks for your positive feedback by the way ! :)
3
u/OmegaVesko Sep 19 '17
I'm pretty sure the author decided to take 'React' out of the title for this exact reason at some point, but forgot to change the title in the ToC.
22
u/lhorie Sep 18 '17
Looks ok for someone coming to js from another language, but I thought the point of cheatsheets was that they were supposed to cram as many snippets as as possible in a standard A4 sheet of paper, for quick look ups.
2
u/madworld Sep 19 '17
This title should mention react. Do you actually think that all modern JS devs use react?
1
u/Goldwerth Sep 19 '17
It was a mistake, at first I wrote such a doc for friends and then changed my idea but I forgot to change the table of contents accordingly.
2
4
3
u/ShootingPains Sep 19 '17
The destructuring example defines a const object that doesn't contain the city property used in the subsequent examples.
3
Sep 19 '17
I think its because he wants to show that you can have a default value when you are deconstructing
1
u/ShootingPains Sep 19 '17
Oh, I see.
I think what tripped me up is that he emphasises that he's using his
const Personobject for the entire section and then up pops an undefinedPerson.city. Emphasising default values in a section about deconstruction seems to be a bit of a detour.
1
Sep 19 '17
3
u/Goldwerth Sep 19 '17
If you take a look at the document, you will see that I often suggest to check MDN to find out more about notions addressed.
About the updates, I will do them when I or people will find things are missing. If it goes out of control for any reason, I will indicate it in the top of the document :).
However, I agree that the "Modern" word might not be the best choice for a title. I've chosen to use it anyway because most people will understand what they will find in the doc today and in the next coming month, maybe years.
Indeed, if the doc was about a fancy new library I would agree. But it's about JavaScript, what is described there is not going anywhere. The industry is not moving very fast so people might find it useful for some time.
Besides, the doc purpose is not to replace nor compete with MDN or official docs. The purpose is to have most notions encountered now in a single page that sums them up and points to references for more details.
3
u/SoInsightful Sep 19 '17
Unlike this one, those are enormous with thousands of pages. Do you know what a cheatsheet is?
1
2
2
1
-14
u/icantthinkofone Sep 18 '17
Actual title: Javascript for React cheatsheet. Real Javascript programmers don't need this.
12
u/Goldwerth Sep 18 '17
Thanks for your honest feedback.
But as much as I understand what you mean, I'm not very fond of the "real" JS developers you are reffering to. JS community is enough victim of that "real developer" thing IMO.
However, it is indeed purposedly made to be read before getting into libraries like react/preact :)
1
u/fogbasket Sep 19 '17
It's a React prep sheet. The name should be different as that's the intention.
0
Sep 18 '17
[deleted]
3
u/Goldwerth Sep 18 '17 edited Sep 18 '17
Good catch, thanks! If you have other things to point out, I suggest you to open an issue on github and I'll gladly look for it :)
Edit: Fixed!
7
u/tswaters Sep 19 '17 edited Sep 21 '17
One thing that kicked my ass a while ago was passing
nullto a function with a default specified expecting the default to be used - it won't be, only no parameter or specifically passing undefined.Also, missing sections for
asyncandawait?