I just had the awesome opportunity to TA and sit in on a 2-day Angular 2 course instructed by one of the top teachers in the web development world and the hungry mind behind One Hungry Mind Blog, Lukas Ruebbelke (@simpulton). It was especially humbling because his eggy bookmarks course was one of the very first times I really dug in and started writing Angular code. It felt like meeting a childhood hero or Santa Claus. I had spent so much time watching his videos that it was surreal to meet him in person, and yes he is really that goofy and funny in real life. haha. Anyway, even though I have been using Angular 2 for a little while now and the course was aimed more for beginners, I still took about 4 pages of notes and learned a ton while I was there. Plus, it was great to get a refresher/confirmation on some basic concepts and some new perspective on how to think about certain other things. In this post I've written a bullet point list of some after-the-fact thoughts while looking back at the notes I took during the lectures. Enjoy!
As you may have guessed from the title, this post is all about understanding what selectors are in an Ngrx Angular 2 application and why one should want to use them. I'll admit it; for a while I didn't use selectors at all. The truth is that you don't *need* them to get a basic project up and running with Ngrx (and that's why I don't talk about them in my Getting Set Up With With Ngrx blog post), but as your application grows along with your understanding of Ngrx you may eventually want to refactor your code and the way you select data from the state to improve your project's consistency and prevent unnecessary duplication. So without further ado, let's talk about selectors!
If you've taken a look at some open source projects that use Ngrx such as example-app, ngrx-examples , or angular-nye-advanced-ngrx then you may have noticed that they have an interesting way of defining Action types. In this post I'll go over why we use the "type" method and why we construct the Action strings in this specific style. Big thanks to Xavier, @xlozingues, for staying at the office late on a Friday to help me understand this. ?
I was recently at a Meetup watching over the shoulder of web development and Angular guru, Daniel Zen. I saw him working in his command line and he would easily open the current directory in WebStorm by typing, "webstorm ." into the terminal window. However, when I tried I would get the error message, "-bash: webstorm: command not found". This post is about installing the webstorm command line tool so that you can use this easy, nifty project opening shortcut.
I was recently on a chairlift talking to my uncle who is a technology exec at a finance company in New York, and he told me that one way they vet people is by looking at their Stack Overflow score. I've landed on Stack Overflow pages many times in the past, but successfully finding and answering questions takes putting in a decent amount of effort and requires knowledge about the problem domain (sometimes, a lot of knowledge about it!). Well, in an effort to selfishly increase my own fame and unselfishly help other struggling devs I've recently began to really try to look for questions that I can answer and provide a solid answer for. I've learned some tips to make the search faster, weed out the fluff, and make it much easier to find those low-hanging fruits. The tip I'll share here is to strategically search for Stack Overflow questions. Enjoy! :)
The posts on this site are written and maintained by Jim Lynch. About Jim...