172 karma · joined May 28, 2017
Does anyone have concrete, practical examples of use cases where awk made your life much easier?
This is very specific to your example, but I guess my point is it is almost always possible to design your in-progress state in a way such that new features are obscured.
With all due respect, I think this is wrong. People play games that are fun, regardless of real-life implications. If you can make a fun game that is socially-conscious, more power to you. But socially-conscious by itself does not make a killer game.
I can't see why this is so hard to understand.
What's wrong with the commute? The fact that, if you didn't have the commute, you could do all those same things and also anything else you can think of. The opportunity cost is enormous.
Many people who seek feedback or reviews are in the latter camp.
The disconnect here is the definition of "concerns."
One analogy is, imagine cutting a square into stripes. You're implying that there's only one way to do so, say, cutting horizontally. But you can easily cut vertically and still end up with well separated stripes.
The stripes, whether horizontal or vertical, are separated cleanly.
While you may see splitting by data fetching, view, etc. as the only way to separate by concerns, there are certainly others. The component model that has been adopted by many React users is one such way.
I don't think that's true. What iOS version did they experience this on?
It's a much more efficient system for the programmer to own UI/UX and for testing and QA to simply verify. In contrast the the programmer doing whatever, and leaving the full responsibility of UI/UX to the testing & QA cycle.
I'm not arguing that the app itself has better video editing UX -- it may very well be that local apps win there. But for onboarding, no installation wins.
Take one of your examples, you're much more likely to know you can "board" once you know there's a "ship." Without the ship as context first, only people who are already familiar with ships know that boarding is even an option.
This provides a poor experience in terms of discoverability.
Can you ELI5 what this means? Very curious to understand ideas on alternatives to the traditional file-system abstraction.
1. This allows internal transfers to avoid reinterviewing. I think many would agree that going through the same interview process is not productive, especially with the types of interview questions asked at FB (predominantly Leetcode style). This reflects FB's standard hiring process for engineers, where engineers are hired into a "general" pipeline and not to a specific team, with the implication that once they pass FB's interview, they are qualified to work on basically any team. The performance requirements are there so that engineers cannot just change teams every time they perform poorly.
2. I think the incentives are intended such that the very worst case for a manager is being forced to fire an employee for poor performance -- it means the manager was unable to help the employee improve their performance. Having them transfer within the company reflects much better on the manager. In practice, this may not be true in all situations.
In the general / common case, this system is great for engineers in terms of internal mobility.
A good mental model is that the second argument to useEffect defines which pieces of state that effect syncs with.
useEffect(() => {}, undefined) // Sync with all state
useEffect(() => {}, []) // Sync with no state
useEffect(() => {}, [a, b]) // Sync with `a` & `b`
It can easily be solved by just setting the state in the event handler, since the state is included in the dependencies array for the fetch effect:
https://codesandbox.io/s/dependency-array-0u3sc
The answer to this question posed by the author?
> On line 23, the useFetch Hook will be called once on the first render. On lines 35 – 38, pagination buttons are rendered but how would we call the useFetch Hook from the event handlers of these buttons?
We can call `useFetch` again by triggering a re-render. This hasn't changed at all with the introduction of hooks: new props or new state still triggers a re-render.
If you ran into something that isn't quite covered by this hook, I'm also curious! Can you write a minimal example in codesandbox and share?
On this particular point, the reasoning is that refs are meant for values that don't need to trigger a rerender[1] -- an escape hatch, rather than something you reach for by default.
In that sandbox, you can accomplish what you mean to accomplish by using state rather than a ref.
[1] https://github.com/facebook/react/issues/14387#issuecomment-...
Not sure if I understand you correctly, but isn't this the purpose of custom hooks? You should be able to freely call hooks within other hooks.