Recent submissions

Comment · 7 years ago
Please don't commit the genetic fallacy here of all places.
Comment · 7 years ago
I do not imply the use of Context. useState() hooks into the local state of whatever component runs it. For example, if you have the following hook:

    function useMagicNumber(default) {
      const [magicNumber, setMagicNumber] = useState(default)

      return [magicNumber, setMagicNumber]
    }
And the following two components that use said hook:

    function ExampleA({}) => {
      const [magicNumber, setMagicNumber] = useMagicNumber(1)
      console.log(magicNumber) // 1
    }

    function ExampleB({}) => {
      const [magicNumber, setMagicNumber] = useMagicNumber(2)
      console.log(magicNumber) // 2
    }
ExampleA and ExampleB share the same code that's run in the hook useMagicNumber, but the state reflected is unique to the component.
Comment · 7 years ago
> I expected a deeper dive into the complexities of these arguments.

Public intellectuals are attempting to appeal to the public at large, the majority of which don't change their minds based on new information. They change their minds based on how that information makes them feel. Trying to convince most people to change their minds with a complex argument is a lot like trying to convince most people to change their minds by talking in Italian instead of English.

Comment · 7 years ago
Maybe something similar to what we have now, but exposes much lower level aspects of the browser and gives you more fine grained control over it. WASM is a good starting point in that it lets you use whatever language you want. Now, we need a browser API that will let us draw directly to the window if we want to. I think a lot could be accomplished by creating the UI portions of a site programatically then dumping the content into a "renderMarkdown()" function.

That's just my idea, though. Hopefully, the current sad state of the web and the coming browser monoculture will spur others to experiment too. I know some gaming companies have experimented with the distributing and executing of x64 binary executables using the browser. I know others are looking into ways to chop up and do progressive loading on binary executables.

Comment · 7 years ago
> as multiple independent components might want to share state or listen to shared events, etc.

If you recall, I said...

> Hooks are great because it keeps the state local, but it can be re-used across components if we need to.

The use case you just defined is exactly why hooks were created.

Comment · 7 years ago
> am simply using redux to manage all state

This only works in small apps. I work on a medium sized app at work and we started that way too. It becomes a huge, sloppy mess in short order. Putting everything in Redux is akin to a desktop application that uses nothing but global state. Hooks are great because it keeps the state local, but it can be re-used across components if we need to.

Comment · 7 years ago
> UI has typically been considered one of the areas where OOP is well suited for

Without any evidence to support it. It's one of those phrases that gets repeated without critical thought.

Comment · 7 years ago
This could be a huge opportunity. We have a web monoculture now. It's only going to get increasingly so over the next few years. Google will let the platform stagnate, as it has little to no reason to compete. It's time to come up with something better. Something designed for both documents and applications.
Comment · 7 years ago
I wonder if we'll see a resurgence of "real work" ui for desktops and laptops now that most of the "everyone else"/"the mainstream" has shifted to mobile.
Comment · 7 years ago
> and bring the country to a grinding halt.

And if it didn't come to a grinding halt? They risk demonstrating how worthless their jobs are.

Comment · 7 years ago
I think 3d holographic projections will be bigger than both.
Comment · 7 years ago
Can confirm. I fondly remember late nights hacking the Gentoo kernel so my college radio station could reliably live stream shows via icecast and darkice.
Comment · 7 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton