
© 2024 Software & Consulting
NX computes a unique computation hash before running any cacheable task.
This hash is based on:
🔍 Source Files: Includes all source files of the app and its dependencies.
⚙️ Global Configuration: Considers relevant configuration files.
📦 External Dependency Versions: versions specified in package.json and lock files.
🌐 Runtime Values: Includes environment-specific values like the Node.js version.
🏁 CLI Command Flags: Different flags, different hashes!
If the computation hash is the same, the task reuses the cached output, saving you precious time and resources 💡
A very common use case for @𝐝𝐞𝐟𝐞𝐫 is to load a component only when (and if) it becomes visible on the browser's viewport, after scrolling down a long page.
It improves metrics like Largest Contentful Paint (LCP) and Time to First Byte (TTFB).
Start leveraging @defer today and watch your app's performance soar! 💡
Multiple guards for a route run concurrently by default. However, there may be use cases when it's necessary to run guards serially.
For example when one guard depends on pre-conditions set by another
🔗A basic 𝐫𝐮𝐧𝐒𝐞𝐫𝐢𝐚𝐥𝐥𝐲() function already existed in tests of Angular, but it will be public in one of the next releases and will be called 𝐫𝐮𝐧𝐂𝐚𝐧𝐀𝐜𝐭𝐢𝐯𝐚𝐭𝐞𝐆𝐮𝐚𝐫𝐝𝐬𝐒𝐞𝐫𝐢𝐚𝐥𝐥𝐲()
Pull request with this feature to Angular is already approved 👉 https://lnkd.in/eK3WjKVF
The next versions of JavaScript (ES) will very probably get the new operator "|>", which is now in the proposal phase 👉 https://lnkd.in/du3iTEmA
It is a functional syntax, where the result of an expression is passed as an argument to the next function call.
For example, we will be able to refactor nested function calls into a more clear sequence of calls.