Javascript component boilerplate