Twitter | Search | |
Kajetan Świątek
Front-end Developer , coding nerd, learning-new-stuff lover.
278
Tweets
545
Following
153
Followers
Tweets
Kajetan Świątek retweeted
Serial Matt 3h
Are you wondering how you can use as a global state while using for the local state? You can check this recipe on our docs: 🚀🚀 Thanks to for all the help.
Reply Retweet Like
Kajetan Świątek Oct 27
Check out the second part of my article on implementing the LetDirective! 😎
Reply Retweet Like
Kajetan Świątek Oct 27
Replying to @wojtrawi @indepth_dev
"Detach" can be used in case we would like to preserve view for later use, but that's not what we do here... I gave it some thought and using "clear" here might have been more understandable (from a purely educational standpoint) so thanks for pointing it out ! 🙏 3/3
Reply Retweet Like
Kajetan Świątek Oct 27
Replying to @wojtrawi @indepth_dev
To clarify for anyone else reading. ViewContainerRef#clear destroys all views in the container, ViewContainerRef#detach detaches the view without destroying it. TBH, there is no particular reason I chose this approach here 🤔 2/3
Reply Retweet Like
Kajetan Świątek Oct 27
Replying to @wojtrawi @indepth_dev
Credits for the article covers goes to the great Ira Kasparova from 👍 If by "destroy old template" you mean using ViewContainerRef's "clear" method instead of "detach" then true, the end results are the same - the view disappears from the container 😉 1/3
Reply Retweet Like
Kajetan Świątek Oct 16
That's a great suggestion! I thought about it myself while writing and decided to leave it that way for the sole sake of readability, that's all 😉
Reply Retweet Like
Kajetan Świątek Oct 16
Soon! Only some minor improvements ahead ✍️
Reply Retweet Like
Kajetan Świątek Oct 16
Thank you team for sharing your knowledge about the topic with me! 🙏 See you soon in Part 2! 💪
Reply Retweet Like
Kajetan Świątek Oct 16
Check out my step-by-step tutorial on how to implement your own structural directive for binding an Observable to the Angular view! 💪🔥🚀 I'm so proud to be accepted as a part of writing community 😊 Enjoy my first article there!
Reply Retweet Like
Kajetan Świątek Oct 13
Thank you ! Check out LetDirective for more features! 🔄 Switching templates on Observable notifications 🎨 Switching rendering strategies 🧠 Internal view caching We are working on some performance benchmarks, so stay tuned!💪
Reply Retweet Like
Kajetan Świątek Oct 11
Replying to @LayZeeDK
From the angular/platform-browser:
Reply Retweet Like
Kajetan Świątek Oct 6
This will be 🔥
Reply Retweet Like
Kajetan Świątek Oct 5
Replying to @KajetanSw
Official docs 📘 can be found here:
Reply Retweet Like
Kajetan Świątek Oct 5
Replying to @KajetanSw
After that, enter your DevTools and "More tools > JavaScript Profiler" to see results of the profiling. You can view it as a detailed list of function runs or as a flame chart. This way you can track down operations that take too long and work on improving the performance! 💪
Reply Retweet Like
Kajetan Świątek Oct 5
Replying to @KajetanSw
Angular teams encourages everyone to keep `msPerTick` under 3ms. In case of high change detection cost, a more detailed profiling may be necessary. You can run by adding an additional flag:
Reply Retweet Like
Kajetan Świątek Oct 5
Replying to @KajetanSw
It runs a quick (500ms) change detection run and gathers some data on it: - `msPerTick` - what is an average duration (in milliseconds) of each CD cycle - `numTicks` - number of cycles performed. The lower `msPerTick`⬇️ is, the better. The bigger `numTicks`⬆️ is, the better.
Reply Retweet Like
Kajetan Świątek Oct 5
Replying to @KajetanSw
Go to your browser DevTools and run:
Reply Retweet Like
Kajetan Świątek Oct 5
Replying to @KajetanSw
In the main.ts file add an extra line that runs `enableDebugTools` on your root component:
Reply Retweet Like
Kajetan Świątek Oct 5
How to set up Profiler that performs basic change detection performance profiling 📈 Thread 🧵
Reply Retweet Like
Kajetan Świątek Oct 3
Sounds like a great idea! 💻 Participate in the 🏆 Win prizes But also... 🎓 Learn a new language 🤯 Challenge yourself with learning FP 🆘 Get help from experienced developers
Reply Retweet Like