Skip to content

Commit

Permalink
Update TIL listing
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 25, 2023
1 parent c1be8e2 commit b779215
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

This is a collection of short notes of the things I have learned on a daily basis while working on different technologies. I share these notes as I [learn in public](https://www.learninpublic.org/).

_**102** TILs and counting..._
_**103** TILs and counting..._

- 2023-10-25: [Emulate a focused page in DevTools](https://github.com/petermekhaeil/til/blob/master/./learnings/devtools-emulate-focused-page.md)
- 2023-10-11: [JavaScript Barrel File](https://github.com/petermekhaeil/til/blob/master/./learnings/js-barrel-files.md)
- 2023-09-18: [Nginx Nested Locations](https://github.com/petermekhaeil/til/blob/master/./learnings/nginx-nested-locations.md)
- 2023-07-20: [Git: push --force-with-lease](https://github.com/petermekhaeil/til/blob/master/./learnings/git-push-force-with-lease.md)
Expand Down
6 changes: 6 additions & 0 deletions feed.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"content": "# Emulate a focused page in DevTools\n\nIf you switch focus from the current page to the Chrome DevTools, some overlay elements automatically hide if they are triggered by focus. For example, dropdown menus.\n\nThe Chrome DevTools have a feature to emulate page focus. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS) and search for \"Emulate a focused page\". You won't lose focus of the page while inspecting the elements.\n\n![Screenshot 2023-10-25 at 10 32 59 PM](https://github.com/petermekhaeil/til/assets/4616064/abd0854f-dac1-43e9-868b-d71496401f7b)",
"date": "2023-10-25",
"path": "devtools-emulate-focused-page.md",
"title": "Emulate a focused page in DevTools"
},
{
"content": "# JavaScript Barrel File\n\nA barrel file is a module that re-exports from other modules:\n\n```js\n// ./components/index.js\nexport { Button } from './Button.js';\nexport { Anchor } from './Anchor.js';\nexport { Text } from './Text.js'\n```\n\nUsage:\n\n```js\nimport { Button, Anchor, Text } from './components';\n```\n\n## Performance Impact\n\nBarrel files have an impact on your bundler performance (this is how I came across the term _Barrel Files_). \n\n- [Next.js recommend to not use them](https://nextjs.org/blog/next-13-1#import-resolution-for-smaller-bundles).\n- They make it difficult on bundlers to analyse your code. \n- They risk exporting modules of the same name.\n- They have a chance of circular references.\n\n## Read More\n\n- https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-7/\n- https://renatopozzi.me/articles/your-nextjs-bundle-will-thank-you\n- https://flaming.codes/posts/barrel-files-in-javascript",
"date": "2023-10-11",
Expand Down

0 comments on commit b779215

Please sign in to comment.