saifelse

Joined 14 years ago

Karma
27
Submissions
13
Member since
Jul 6
[ my public key: https://keybase.io/saifelse; my proof: https://keybase.io/saifelse/sigs/cSTmRL5Dgn1wvSyZ2q9DU2oshyFSIvBa4B3gfVln_WQ ]
View on Hacker News

Recent submissions

Comment · 24 days ago
Article content is using less than 56% of the available width, due to:

    #content-inner { width: 80%; }
    #content-inner #alpha { width: 70%; }
Comment · 9 years ago
> McDonald’s doesn’t plan to use the individual images by themselves for this reason. “When you present the visuals for the five key nutrients together in full color,” Fairgrieve concludes, “the potentially negative connotations of red fade away.”
Comment · 9 years ago
Author of the Benchling mixin / blog post, here. Thanks for including the credit and for making this technique more easily usable!

I'm quite happy that this is being utilized by so many people :-)

Comment · 9 years ago
While it may be optimized, I think the suggestion is that instead of using a hack repeatedly, it is arguably better to be DRY and abstract it away.
Comment · 10 years ago
Somewhat interestingly before you'd go from getsentry.com --> app.getsentry.com during authentication, whereas now the domain is the same (i.e. sentry.io/welcome --> sentry.io).

I wonder if this simplifies tooling around analytics, since now their logged-out domain matches their logged-in domain.

Comment · 10 years ago
Author here, interested to hear what other tools/workflows you use for debugging!
Comment · 10 years ago
Comment · 10 years ago
Comment · 10 years ago
What you described is the current replacement for auto-bind (that React.createClass used to do for you). The issue arises when you have not just one SubComponent, but n SubComponents that require the parent method bound to the subcomponent's index, e.g. you have a deleteItemAtIndex method, and you only want to expose {deleteItem: deleteItemAtIndex.bind(this, i)} to each child component. ES6 React classes don't have any special way of handling this.

To re-iterate the possible solutions I've considered:

- Don't pass in a bound method; give the component the unbound method and its index and the child component can call it with the index passed in itself. - Generalize this to a re-usable intermediary component that does for you (it does feel a bit dirty) - Write your own bind function that annotates the bound function with original function + params allowing you to do a "deep" equality check, and then use a variant of PureRenderMixin that does this "deep" equality check.

Honestly, all of the solutions feel a bit hacky, but I've gravitated towards the first and second options.

Comment · 10 years ago
> can you share more details about your UI stack and dev workflows

Our front-end stack was primarily just webpack (no JSX because CoffeeScript's terseness sufficed). We recently started the migration to using Babel with ES6 and JSX because of the linting / tooling / community behind them.

I will be sharing a more in-depth look at my debugging workflow in the next post, so be on the lookout :-)

> Also any recommendations for performant charting/graphing library that plays well with React?

I haven't used many charting / graphing libraries, sorry!

> What do you use for state management?

We were fairly early adopters to React and Flux, so we have our own internal implementation of Flux. I haven't worked too much with the other state management solutions, but many of them seem like good, opinionated architectures.

> Thank you for sharing your experience and tips regarding developing React apps!

No problem :-)

Comment · 10 years ago
Author here, happy to answer any questions!
Comment · 12 years ago
More like:

    if(userHasUpdatedPw) { checkPw(hash(pw)) }
    else{ checkPw(hash(assertDoubledAndTakeHalf(pw)))}
Comment · 13 years ago
Is there a particular reason why Google servers are still accessible from within MIT despite MITnet being down?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton