Tags
Browse all tips by topic. Pick a tag to jump to its tips.
Accessibility4 tips
Angular7 tips
- Listen for specific keys in Angular Templates
- Style Angular Components based on their context
- Angular HttpClient accepts query params as object
- Data binding to aria attributes in Angular
- Angular Outputs can be RxJS Observables
- Inject the unique app id of your Angular app
- Type-safe factory deps in Angular with inject()
Browser & DevTools7 tips
- Use $0 in the browser console to get the current element
- Find elements in the browser console with $$
- Copy text in the browser console with the copy() function
- Emulate a focused page in DevTools to debug overlay elements
- Observe values in Browser DevTools with Live Expressions
- Empty Cache and Hard Reload in Chrome
- Create QR codes in Chrome to send URLs to your smartphone
CSS9 tips
- Get the current text color with currentColor in CSS
- Enable smooth scrolling with scroll-behavior in CSS
- CSS has a turn unit to rotate elements
- Style Angular Components based on their context
- CSS calc() requires unit
- CSS content-visibility hides the content of an element
- Named lines in CSS grid
- Use @at-root in SCSS to break out of nesting
- Scope your CSS imports with meta.load-css in Sass
Git & GitHub7 tips
- Find files by name on GitHub
- Open GitHub repositories in VS Code directly in your browser
- Amend the previous commit and keep the commit message
- Reuse the last git commit message in VS Code
- Configure default branch name in Git
- Switch to the previous git branch with git switch
- Find the gitignore rule that excludes a file from git
HTML4 tips
JavaScript15 tips
- Insert multiple HTML elements at once with DocumentFragment
- Style console log outputs in JavaScript
- Edit any website in design mode
- Function parameters can have default values based on other parameters
- setTimeout accepts arguments for the function
- Create an array with the map function of Array.from
- Alpine.js accepts a custom prefix for directives
- How to use Array.map() with objects
- Keep the separators when splitting a string in JavaScript
- How to get the event target inside Shadow DOM
- Get IANA timezone of user
- Query selectors are applied to the whole document, unless you use :scope
- Get translated display names with Intl.DisplayNames
- Backreference in RegEx allows matching the same text as a previous capturing group
- XState Actors are observables
React4 tips
RxJS5 tips
Terminal3 tips
Testing3 tips
Tooling4 tips
TypeScript11 tips
- Separate large numbers in TypeScript with underscore
- Assert that all possible cases in a switch statement are handled
- Define an array with a min length in TypeScript
- TypeScript supports arrays with the rest syntax at the beginning
- Check if a string is a valid enum value in TypeScript
- Create a string type in a specific format in TypeScript
- Extract types in TypeScript
- Exclude certain types in TypeScript
- React function component without children in TypeScript
- Custom hooks should return named tuples and not use "as const"
- Replace any with generics, not with unknown (in many cases)
VS Code8 tips
- Restart TypeScript server in VS Code with a command
- Navigate easier in large files via symbols in VS Code
- Open GitHub repositories in VS Code directly in your browser
- Generate code with Emmet in VS Code
- Reuse the last git commit message in VS Code
- Enable Screencast Mode in VS Code
- Move VS Code Side Bar to the right
- Search & replace with RegEx groups in VS Code