Latest post

React scroll decorator

17 May 2017

Muffin Man's writings

or the front end playground

Front end development, maybe occasional rants and music.

React scroll decorator

I love JavaScript decorators. One that I copy to every React project is scroll decorator. It is fairly simple way of injecting scroll position to react components. This way you can handle scroll using react lifecycle.

This decorator is not listening to a scroll event, as that is the performance killer (especially when you push it to react lifecycle). Instead, it is using interval to check if scroll position has changed. To keep it performant, I’m using requestAnimationFrame. Interval is only there to throttle animation frame from triggering too often.

Read more

Time Pills tracks, stems, presets, loops and midi

Friends of mine from the band Time Pills opensourced bunch of their tracks. You can find them on GitHub. They are looking forward to creative people remixing their them and sharing it with the world. So go nuts!

Repo contains all of the tracks, stems, presets, loops and even midi files.

Time Pills SoundCloud profile

Be sure to check them on SoundCloud as well.

Enjoy!

Work&Co Tech Meetup Vol 6

Another tech meetup coming up. This time we have three great talks about engineering and project planning. We also have a special guest - IT girls team.

The IT Girls team will share their advances in promoting the professional development of women in technology in Serbia.

This one will be held on Tuesday, May 16th at Impact Hub Belgrade. See you there!

Work&Co Meetup Tech Meetup Vol 6

Check the details and sign up at meetup.com page.

Talks

  • Docker IRL, Miloš Pavlićević

    Find out how to incorporate Docker into your deployment/delivery process, with images! (pun intended)

    Slides

  • Javascript Unit Testing, Sarah Mogin

    Learn the value of testing your Javascript applications and the tools and techniques for effective testing. We’ll focus on how to test React components, selectors, reducers, and sagas using the Jest and Enzyme libraries.


    Slides

  • Introduction to React Native, Zeh Fernando

    We had last minute change, and replaced Nemanja’s talk (Plan Smart) with Zeh’s great introduction to React Native.

    Slides

Post will updated with photos and slides.

Nicer git log

Just a short one. I want to share a simple command to display nicer git log in the terminal. git log has --pretty=format option built-in, we are just going to pass formatting to it.

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'

And it looks like this:

Nicer git log

Then add it to your .bash_profile as an alias (I’m using glog) and that’s it.

alias glog="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"

Being a tech lead, the thing I miss the most

I started leading teams relatively early in my career. Mentoring and leading younger developers is something I tremendously enjoy. But there is one thing I really miss about being a “regular” developer.

And that is - being able to put my headphones, play some rock ‘n’ roll, and code for a couple of hours without any distractions.

Something that is almost impossible today. I’m not complaining, but the truth is that I really miss it. Luckily, I can fulfill my geek needs working on pet projects.

Cheers!