In celebration of ECL & PAX, we're ⚔️ CHALLENGING YOU ⚔️ to an RT #GIVEAWAY! Starting at 5 codes, RT and Like this post to unlock up to 20 codes total before AUG.30th @ 8PM PT! Winners choice of AoE:DE or AoEII:DE pre-purchase for Steam or Windows! Check this thread for details!
Performance Techniques with new Web APIs ⚡️ - https://t.co/0Xq8rE7z2f - Interesting slide deck with mentions on event debouncing, will-change, CSS Containment, layout thrashing & a few others
JavaScript: Does it mutate - https://t.co/6pWnyUfezf - A clear list of JavaScript methods with a warning flag to indicate if mutation occurs. Includes code examples and descriptions ✅
Tip: Webpack supports performance budgets for sites 💰
You can..
✍️ Configure a max file size (e.g JS should be < some KB)
🚨 Throw a warning or error if files get large
🔎 Only apply to certain file extensions (.js, .css etc)
https://t.co/eH7cmTLr5I
TIL: You can use Object.assign on a string! #justjavascriptthings Why's that useful? See below.
How neat is that! 😍 No more colors.gray.default!
(via @stephengfriend in https://t.co/UFnHO3v2bH)
Hot reloading has transformed how I work over the last two years. You don't need to configure webpack-dev-server or anything else to try it out.
https://t.co/7xXjdnyLmC
https://t.co/GOAs57lTc9
Tip: When creating a new React component, start by requiring all props. Why?
1 Handling the null case requires extra code
2 It's easy to forget to handle missing prop values
3 Optional props increase complexity
So: Require props/use defaults until the optional prop is justified.
🔥 Love GIFs, but hate their size? Replace animated GIFs with <video> to save a *ton* of kilobytes: https://t.co/Kx4tXCCRK3 ~ our new guide by @malchata ⚡️
Trick for keeping secret data out of a repository (in Node.js):
– Put the data into a Node.js module, e.g. secret.js. Put that in a node_modules/ that is an ancestor of the repo (e.g. Unix: ~/node_modules/secret.js).
– In repo: const secret = require('secret');