HNHacker News
TopNewBestAskShowJobs

kentor

466 karma · joined June 8, 2013

https://kentor.me/ https://github.com/kentor
submissionscomments
kentor··on Setting up your own blog
For those who want to use React to generate a static site check out the source to my blog: https://github.com/kentor/kentor.github.io. I've ditched Jekyll because I don't want to use its template system and have ruby set up.
kentor··on React Templates
People who want to use a template system for React are seriously missing the point.

When you use strings that converts into javascript, e.g.

  onChange="()=>this.toggleChecked(todoIndex)
then you lose out on all the static analysis tools that work on javascript, the language. Are there any existing tools that are going to tell you that

  this.toggleChecked
is undefined? I doubt it.

Please embrace javascript, not crippled DSLs.

kentor··on Ask HN: Has anyone built a reactjs state editor yet?
React dev tools? https://chrome.google.com/webstore/detail/react-developer-to...
kentor··on JavaScript developers are incredible at problem solving, unfortunately
Because "code over configuration". Personally I'm not a fan of Grunt's API which requires huge json files where keys mean special things. It feels very ad hoc and ugly. Gulp's API is like 5 functions.
kentor··on React on ES6+
Tooling and static analysis. ESLint can tell me if `MixinComponent` is undefined during parse time.
kentor··on DigitalOcean Raises $83M in Series B Funding
I've switched from DO to Vultr back when DO did not offer FreeBSD and DO's SFO network was pretty bad. I'm back on DO now because I've got my hands on some credits, but I would switch back to Vultr when I run out. DO's SFO network has improved I think, but for the $5 plan you get 50% more memory at Vultr (512mb vs 768mb).
kentor··on Facebook PathPicker
same problem here. need to make it aware of my aliases :\
kentor··on Simple Regex Filter with React.js and Immutable-Js
Please don't do what's written in this article. It's an anti-pattern to set state from props[1]. Consider what happens when a new set of data is passed to this component from above, this component won't get the new set of data and now it's out of sync with the rest of the application.

Another problem with what's written is that there's unnecessary state. In general it's best to figure out the minimal set of state needed to render the UI; everything else should be computed on the fly, directly in the render call (or refactored out into methods).

In this article, data and filteredData as state is unnecessary! The minimal state needed to describe the UI is the text to filter the data and the data itself which is from props. filteredData should be computed, not stored in state.

The text in the input box should always represent the state of the filter text, and the box itself can be used to update this state. This can be achieved with LinkedStateMixin[2].

1. https://facebook.github.io/react/tips/props-in-getInitialSta... 2. https://facebook.github.io/react/docs/two-way-binding-helper...

kentor··on You Can't JavaScript Under Pressure

    n % 1 == 0
kentor··on Google's Sergey Brin explains why he paid $330,000 for lab burger
fat is good for you. more fat please
kentor··on The Myth of Willpower and “Eat Less, Move More”
why avoid saturated fats? because they cause heart disease?
kentor··on NSA veterans speak out on whistle-blower [video]
i can't seek in the video. what the hell? i accidentally clicked outside of the popup box and now i have to watch from the beginning...
← PreviousPage 4 of 4