Projects by Ayc0Various personal projects (finished or not), and all the blog posts I wrotehttps://ayc0.github.io@blocz/react-responsive v4https://ayc0.github.io/posts/blocz-react-responsive-v4?utm_source=rsshttps://ayc0.github.io/posts/blocz-react-responsive-v4?utm_source=rss@blocz/react-responsive v4 was just released. Let’s go through all the different features and changes added by this new major versionWed, 01 Jan 2025 00:00:00 GMTreactnewsMonitoring WebSocketshttps://ayc0.github.io/posts/monitoring-websockets?utm_source=rsshttps://ayc0.github.io/posts/monitoring-websockets?utm_source=rssTools like Sentry or Datadog provide amazing monitoring tools for a lot of requests, but not for WebSockets. Why is that and can we find a way to still monitor WebSockets?Mon, 23 Dec 2024 00:00:00 GMTjavascriptwebsocketIntl.Segmenter(): Don't use string.split() nor string.lengthhttps://ayc0.github.io/posts/intlsegmenter-dont-use-stringsplit-nor-stringlength?utm_source=rsshttps://ayc0.github.io/posts/intlsegmenter-dont-use-stringsplit-nor-stringlength?utm_source=rssUTF is tricky: the length of a string can mean a lot of different things based on whether you want the number of code points, code units, and graphemes. What are the differences, and how can we navigate through those using JavaScript?Tue, 25 Jul 2023 00:00:00 GMTjavascriptunicodeTypeScript 5.0: new mode bundler & ESMhttps://ayc0.github.io/posts/typescript-50-new-mode-bundler-esm?utm_source=rsshttps://ayc0.github.io/posts/typescript-50-new-mode-bundler-esm?utm_source=rssTypeScript 5.0 is out and introduced a new compilation option: `moduleResolution: bundler`, let’s see how we can use itTue, 11 Apr 2023 00:00:00 GMTtypescriptjavascriptnewsHow does CSS work? The specificityhttps://ayc0.github.io/posts/how-does-css-work-the-specificity?utm_source=rsshttps://ayc0.github.io/posts/how-does-css-work-the-specificity?utm_source=rssWhen writing CSS selectors, they sometimes don’t seem to be following the order of the code. Indeed they don’t: they also follow the specificity of each selectors. But what is the specificity and how does it work?Mon, 30 Jan 2023 00:00:00 GMTcsswebdevHow to learn CSS with gameshttps://ayc0.github.io/posts/how-to-learn-css-with-games?utm_source=rsshttps://ayc0.github.io/posts/how-to-learn-css-with-games?utm_source=rssA tiny list of websites to learn CSS while playing interactive gamesThu, 26 Jan 2023 00:00:00 GMTcsstipCSS :before vs ::before & :after vs ::afterhttps://ayc0.github.io/posts/css-before-vs-before?utm_source=rsshttps://ayc0.github.io/posts/css-before-vs-before?utm_source=rssIs there a difference in CSS between `:before` and `::before`? Which one is valid? What about similar syntaxes like `:hover` and `::first-child`?Tue, 17 Jan 2023 00:00:00 GMThtmlwebdevfundamentalscssLight/dark mode: Correctionshttps://ayc0.github.io/posts/light-dark-mode-corrections?utm_source=rsshttps://ayc0.github.io/posts/light-dark-mode-corrections?utm_source=rssIn my previous articles about Light/dark mode, I made a few mistakes, or forgot to mention some elementsMon, 16 Jan 2023 00:00:00 GMTwebdevcssjavascriptProper cross-fade in CSShttps://ayc0.github.io/posts/proper-cross-fade-in-css?utm_source=rsshttps://ayc0.github.io/posts/proper-cross-fade-in-css?utm_source=rssClassical cross-fades in CSS using opacity don’t properly animate the opacity of elements, making them less opaque then needed. This article will show you how to achieve a proper cross-fade in CSS.Thu, 06 Oct 2022 00:00:00 GMTcsswebdevTypeScript 4.9: satisfies operatorhttps://ayc0.github.io/posts/typescript-49-satisfies-operator?utm_source=rsshttps://ayc0.github.io/posts/typescript-49-satisfies-operator?utm_source=rssTypeScript 4.9 is out and introduced a new operator: `satisfies`, let’s see how we can use itSun, 25 Sep 2022 00:00:00 GMTtypescriptnewsCRA vs Parcelhttps://ayc0.github.io/posts/cra-vs-parcel?utm_source=rsshttps://ayc0.github.io/posts/cra-vs-parcel?utm_source=rssA comparison between Create-React-App & Parcel when building a React single-page-appMon, 05 Sep 2022 00:00:00 GMTjavascriptreactparcelbundlerSemver: The unknown buildMetadatahttps://ayc0.github.io/posts/semver-the-unknown-parts?utm_source=rsshttps://ayc0.github.io/posts/semver-the-unknown-parts?utm_source=rssThe semver’s spec mentions a group called “buildMetadata”. If you’ve never heard of this before, you’re not aloneThu, 14 Jul 2022 00:00:00 GMTnpmversioningYarn.lock: How to update ithttps://ayc0.github.io/posts/yarn-lock-how-to-update-it?utm_source=rsshttps://ayc0.github.io/posts/yarn-lock-how-to-update-it?utm_source=rssYarn comes with a lock file `yarn.lock` that isn’t made for human to edit it. But sometimes you need to do a specific edit in it (like dropping a specific package). This article highlights a few different ways to do soSun, 05 Sep 2021 00:00:00 GMTyarntipYarn.lock: How to read ithttps://ayc0.github.io/posts/yarn-lock-how-to-read-it?utm_source=rsshttps://ayc0.github.io/posts/yarn-lock-how-to-read-it?utm_source=rssYarn comes with a lock file `yarn.lock` that isn’t made for human to read it. But when using the tool, you sometimes need to go through it to be able to understand it (specially when reviewing PRs)Tue, 27 Jul 2021 00:00:00 GMTyarntipLight/dark mode: React implementationhttps://ayc0.github.io/posts/light-dark-mode-react-implementation?utm_source=rsshttps://ayc0.github.io/posts/light-dark-mode-react-implementation?utm_source=rssAfter building a few different ways of creating light/dark modes for your websites, either in plain CSS, or with a bit of vanilla CSS, we need to tackle the topic of React websites. While most of the core will be the same as previously seen, React requires a few custom bindings for its particular life-cycles & data flowThu, 24 Jun 2021 00:00:00 GMTwebdevcssreactjavascriptdeep-diveLight/dark mode: avoid flickering on reloadhttps://ayc0.github.io/posts/light-dark-mode-avoid-flickering-on-reload?utm_source=rsshttps://ayc0.github.io/posts/light-dark-mode-avoid-flickering-on-reload?utm_source=rssWhen manually handling the theming of your website, you may run into a flicker at the page load from white to black. This is because your JavaScript takes some time to boot and to apply the dark mode. Let’s see how we can fix thatTue, 01 Jun 2021 00:00:00 GMTwebdevcssjavascriptLight/dark mode: system mode + user preferenceshttps://ayc0.github.io/posts/light-dark-mode-system-mode-user-preferences?utm_source=rsshttps://ayc0.github.io/posts/light-dark-mode-system-mode-user-preferences?utm_source=rssIn all my past articles, I showed either how to create a light/dark mode following your users system without JavaScript, or how to create a light/dark swatch for your website using JavaScript but without system mode. It is time to see how to reconcile those 2 approachesMon, 31 May 2021 00:00:00 GMTwebdevcssjavascriptLight/dark mode: the simple wayhttps://ayc0.github.io/posts/light-dark-mode-the-simple-way?utm_source=rsshttps://ayc0.github.io/posts/light-dark-mode-the-simple-way?utm_source=rssHandling light/dark mode on your websites don’t have to be complex. A few lines of CSS to declare a few CSS variables can be all you need!Sun, 30 May 2021 00:00:00 GMTwebdevcssLight/dark mode: user inputhttps://ayc0.github.io/posts/light-dark-mode-user-input?utm_source=rsshttps://ayc0.github.io/posts/light-dark-mode-user-input?utm_source=rssIn this article, we’ll see how we can implement the logic to switch back & forth between light/dark modeSun, 30 May 2021 00:00:00 GMTwebdevcssjavascriptLight/dark mode: the lazy wayhttps://ayc0.github.io/posts/light-dark-mode-the-lazy-way?utm_source=rsshttps://ayc0.github.io/posts/light-dark-mode-the-lazy-way?utm_source=rssLet’s see how we can build a dark-mode compatible website, following your user’s system preferences, with 1 line of CSSSat, 29 May 2021 00:00:00 GMTwebdevcssResponsive design in Reacthttps://ayc0.github.io/posts/responsive-design-in-react?utm_source=rsshttps://ayc0.github.io/posts/responsive-design-in-react?utm_source=rssThis short article focuses on when to use raw CSS vs React bindings when working with responsive designsSun, 09 May 2021 00:00:00 GMTreactwebdev@blocz/react-responsive v3 is outhttps://ayc0.github.io/posts/blocz-react-responsive-v3-is-out?utm_source=rsshttps://ayc0.github.io/posts/blocz-react-responsive-v3-is-out?utm_source=rss@blocz/react-responsive v3 was just released. Let’s go through all the different features and changes added by this new major versionFri, 12 Mar 2021 00:00:00 GMTreactnewsReact refs and DOM referenceshttps://ayc0.github.io/posts/react-refs-and-dom-references?utm_source=rsshttps://ayc0.github.io/posts/react-refs-and-dom-references?utm_source=rssYou sometimes needs to have access to the underlying HTML elements in React. This short article is here to help you navigate this problemFri, 21 Aug 2020 00:00:00 GMTreactdomMigrating class components to hooks – ruleshttps://ayc0.github.io/posts/migrating-class-components-to-hooks-rules?utm_source=rsshttps://ayc0.github.io/posts/migrating-class-components-to-hooks-rules?utm_source=rssMigrating class components to hooks can be difficult. There is no official guideline to help you migrate to them. This article will list the major advices you may want to follow during those migrationsTue, 18 Aug 2020 00:00:00 GMTreactMigrating class components to hookshttps://ayc0.github.io/posts/migrating-class-components-to-hooks?utm_source=rsshttps://ayc0.github.io/posts/migrating-class-components-to-hooks?utm_source=rssThis article is an applied example of how I migrated the library `react-only` from classes to hooksSun, 03 May 2020 00:00:00 GMTreact