When using the @wordpress/scripts package, it will automatically create a .deps.json file for every JavaScript entrypoint. This file contains a list of all the WordPress JavaScript dependencies used in it and in all the file it imports. Therefore it really simplifies keeping track all of the dependencies of a script. But the question that quickly […]
Continue readingCategory: Quick Tips
.map vs .forEach – what's the difference?
September 3, 2019Another thing that I realised later than I probably should have was: Why do .map and .forEach even both exist ? In my mind they were both just useful when wanting to iterate over every single item inside an Array with no easy ability to stop in between 🛑. But one day while working with […]
Continue readingWhat are higher order functions?
August 1, 2019When working on some filtering and sorting functionality, there is something wished I would have learned much earlier in my career. Before that point I didn’t really understand what higher order functions were or why it would be useful to return a function from another function. So I hope that this might help someone find […]
Continue reading