This seems reasonable, but I also don't know JavaScript very well and I don't know any React. You might want to have someone else to look over it if you want a second pair of eyes that are useful beyond "this isn't insane" :smile:.
I'm also not a JS expert, but it looks OK to me to. I say merge it.
Pull-Request has been merged by abompard