It can be easily set up with a module resolver:Continue reading
Difference between ESLint and Prettier
What they do:
- ESLint: underline when code doesn’t comply to logical rules. Can run a script and fix some easy errors (etc. unused variables lying around)
- Prettier: doesn’t change the logic of code, only formats it (etc. removing extra spaces, turning double quotes to singles)
new Date() Not Valid in Safari
Not all the date formats can be used to create a date with
Object doesn’t support property or method ‘scrollTo’
Even if Edge is not called Internet Explorer, it’s still basically IE. 🙁 And IEs don’t support scrollTo.Continue reading
React: How To Prompt User of Unsaved Data before Leaving Site
There’s a specific function for this:
Yarn Upgrade All Dependencies to Latest
yarn upgrade-interactive --latest
a key to select all of them.
Looping Through Async/Await
Two situations.Continue reading
Webpack: New Resolve Root Path
- src |- components ||- CatComponent.js ||- DogComponent.js - node_modules /* src/components/DogComponent.js */ import CatComponent from 'components';
For importing from another directive to work like imports from
node_modules like above, configure webpack.
Tab Forever Loading
If you find the loading spinner in browser tab spinning forever, it might be due to the use of
AngularJS: How to Get The Controller of Another Component
Or perhaps it should be called “How to get rid of the
$parent.$parent.$parent...$parents in your code”, or “How do components talk to one another”.
There are a couple of ways to deal with it.