Better HN
topnewbestaskshowjobs
Log inSign up

chrisfrank

11 karma · joined Apr 9, 2018 (8y ago) · 8 submissions

Submissions

comment 7y ago · link · parent

I work with Ruby on the web, but rarely with Rails. Apart from the Ruby language itself -- which I love, even though I sympathize with those who don't -- I can't imagine giving up these two libraries by Jeremy Evans:

[Sequel](https://github.com/jeremyevans/sequel) - Sequel is the best ORM I've ever used, in any language. Fast, stable, unbelievably well maintained, and offers great low-level access to the database when you need it.

[Roda](http://roda.jeremyevans.net) - This dynamic routing library is conceptually similar to React Router, in that there is no static list of routes; routing is a function call. But it's faster than React on the server, and has better support for HTTP verb support, database I/O, etc.

As for there being "better tooling" in modern JS, I'm not sure I agree. Babel and ES6 are impressive, and I love writing the code they make possible. But I appreciate being able to write Ruby and know that it will just run. Writing packages for node means choosing one of two incompatible module systems, or adding transpiler bloat.

comment 8y ago · link · parent

Thanks! I started by just passing props too, and I could see that approach working forever. I just got tired of having to always specify <Button bg="blue" border="ba1" />, when 90% of the buttons in the app were blue with a border.

comment 8y ago · link · parent

I've also found Tachyons & React to be an amazing combination. The only trouble I've had is extracting common CSS class strings into tweakable components, e.g. a <Button> whose background color you can easily override, or a <Header> with tweakable font weight.

I wrote a tiny (1kb) library to make this easier. For anyone working with React and functional CSS, I hope it's helpful:

https://www.npmjs.com/package/nanostyled

comment 8y ago · link · parent

Thanks! It's a tiny library and my team is using it in production, so I plan on maintaining it for a very long time.

comment 8y ago · link · parent

Author here. This library aims to be a compromise between the expressive APIs of CSS-in-JS libraries like styled-components, and the extremely low overhead of plain CSS.

Would love feedback on, in particular, whether it seems like a useful compromise, or whether it fails to capture enough of what's good about either CSS-in-JS or plain CSS on their own.

6.

Show HN: Nanostyled – a 1kB library for styling React components with atomic CSS(github.com ↗)

5 points · by chrisfrank · 8y ago · 3 comments

comment 8y ago · link · parent

Adam, your "Separation of Concerns" article was what sold me on utility-first CSS. Thank you.

For anyone building React apps with Tailwind or Tachyons, I just open-sourced a library that makes it easier to reuse CSS classes in standalone, customizable components:

https://www.npmjs.com/package/nanostyled

(I think this is a React implementation of what the Tailwinds docs call "Extracting Components".)

8.

Show HN: Rack::Reducer – dynamically filter data via URL params, in any Rack app(github.com ↗)

1 points · by chrisfrank · 8y ago · discuss