Author Archives: BrunoLM

About BrunoLM

http://brunolm.com

Migrating to React Router 4 with Redux

react-router v4 requires you to do more stuff to add a proper route.

You will need to install:

npm i -S history react-router react-router-redux

browserHistory is no longer available, to create a history object you need:

import { createBrowserHistory } from 'history';
// then call createBrowserHistory()

Continue reading

Using editorconfig to keep your files formatted properly

Editor config is an extension available on Visual Studio Code, Atom, Vim and many other editors, you can check a complete list on the official website.

editorconfig-stickers

It defines a set of rules that your editor follows. You can configure so that all your files, or just some matching the extension, will follow some rules as trim whitespace at the end, tabs as 2 spaces and so on.

This way your files will be consistent across your project, and allows people to contribute without making a mess in your codebase.
Continue reading

Bot for Slack built with TypeScript and node – @genos

You can find the bot project on my Github – slack-genos.

genos-bot-slack

There is a node package called slack that extracts all the Slack API and create functions for each.

npm i -S slack

They don’t provide TypeScript definition files, but we can create on own file under /typings folder.

With that I created a structure to run the bot.
Continue reading