Closed jorgebucaran closed 7 years ago
@jbucaran any reason for using Upper Case for Logger
? It looks like it should be a component. Since it's a function, I'm used to going with lower case.
@okwolf In hyperapp we don't use classes / constructors, so we don't generally need to follow that convention and it's also how the Router works too.
The module exports a function so you can always...
import logger from "hyperapp-router"
...if you want though.
@jbucaran I guess it matters more for the global for use in browsers.
@okwolf React's global is also React and ReactDOM. It also looks good, but I guess that's a matter of taste too.
@jbucaran should the global for Hyperapp be Hyperapp
then? 😉
@okwolf Yes, I think so. That should be the way to go. Or not, maybe only mixins?
/cc @MatejMazur @Zaceno @Jamen @Andyrj @Selfup
@okwolf Most modules are a single default export so if the exported global is lowercase or uppercase, I don't mind.
But in the router, we export two things and the default export is actually { Router, Link }. Link is a component, and those must be uppercase. The Router is mixin, not a component, so it doesn't really matter. I made it uppercase because I felt it was more aesthetically pleasing though, but I can change my mind if that's how people like it.
@okwolf Let's go with lowercase then. I'll update the router later.
@jbucaran thanks for the updates. I'm ready to merge if you're happy.
👍
cc @okwolf.