Latest post

React Image Filter

02 Sep 2017

Muffin Man's writings

or the front end playground

Front end development, maybe occasional rants and music.

Mobile Chrome vh units fix

6 Comments

If you ever used vh units and tested your work on mobile Chrome (iOS and Android), you probably were annoyed by page jumping when you scroll.

As you probably know vh units are based on the window height. When you scroll, Chrome’s address bar disappears and chrome actually changes window height. Also triggers window resize event. So when it does happen it changes the value of vh unit, making your elements resize, and page jump. On Android, keyboard toggle will do the same.

Well I made a plain JavaScript library to solve this problem.

Demo and documentation are available here.

Read more

Deploying React (Router) app to the subfolder on server

If you ever had to deploy React Router app to the subfolder on the server, you know what the problem is. Dev server will always launch app on the server root. And routes will get messed up once you upload it to the server. Here are two solutions I use in these cases.

Easy way, just use hashHistory

The easiest way to achieve this is to use hashHistory instead of browserHistory.

import { Router hashHistory } from 'react-router';

<Router history={ hashHistory }>
  ...
</Router>

This is the best approach if your subfolder name changes (for example, if folder name is a build version). But you’ll have /#/ included in the every URL. If this bothers you, check the second solution.

Read more

Winter Tech Meetup Vol 5

We prepared another tech meetup, this time with four presentations. There will be a break after the second one. This should be the biggest one so far, with two guest speakers.

It will happen on February the 4th, at Belgrade Youth Centre. Hope to see you there!

Visit Facebook event or meetup.com page. And apply here.

Thanks to everyone who participated!

Slides

Photos

Nikola Pantović Tech meetup audience Stanko Tadić talking about JavaScript Saša Ranisavljević

Counting sheep

Just something to cheer you up for the holidays :) I got this idea while I was sick in bed, and had nothing smarter to do. Pure CSS, no JavaScript at all. Hope you like it, I may add some more details.

Check the code on codepen.

Happy new year!

Looking forward to the 2017

2016 was quite a ride. I just want to write a couple of random things, to close this year with one last post.

Work & Co

Big news here, my ex-company became a part of Work & Co. We’re really excited about that, and I’m looking forward to the great stuff we are going to build. Our collaboration goes back for a few years now, it was very productive, and this is a great step forward.

My current title is a Principal developer and I’m in charge of a tech team, here in the Belgrade office.

Read more