There aren't many pain points when working with @Netlify , but single page app redirects are one of 'em.
Here's a script we use to generate a netlify.toml with a redirect rule for every SPA route
#JavaScript#CodeNewbie
Lots of confusion out there re: promises vs thenables.
A promise is an instance of the Promise class
A thenable is an object that has a then() function
A promise is a thenable. But a thenable isn't necessarily a promise
📖 masteringjs.io/tutorials/fun…#JavaScript#CodeNewbie
2 quick tips for better tech writing:
1. Shorter, snappier sentences. No 'and'
2. Avoid using pronouns like 'it'
"it works and the return result is correct but when it runs it fails and on top of failing its undefined" 😕
#JavaScript#CodeNewbie#TechWriting
You can use `class` and `:class` side-by-side on elements in Vue. `:class` conditionally adds classes.
Here's some code from a navbar we wrote recently. Add `active` class if current route matches
Learn more 👉 masteringjs.io/tutorials/vue…#JavaScript#VueJS
Object spread operator is also helpful for shallow cloning, or for shallow cloning with some fields overwritten.
More about shallow cloning in JavaScript 👉 masteringjs.io/tutorials/fun…#JavaScript#CodeNewbie