HNHacker News
TopNewBestAskShowJobs

loh

562 karma · joined November 12, 2019

molecule.dev
submissionscomments
loh··on Two custom React hooks
You can certainly compose a `useThing` hook (and others) for more encapsulation and functionality specific to said thing.

We actually do this elsewhere as necessary, like with the top level `Store` component. For the most part, it depends on the situation and how concise/redundant (or not) you want to be. In many cases it actually ends up being more concise overall to simply compose `setState(readThing(id))` as needed, instead of creating a specific method for every possibility.

loh··on Two custom React hooks
I understand. If you get a chance, please clone the core API and app (https://github.com/Molecule-dev) and play around with it. Maybe you'll change your mind?
loh··on Two custom React hooks
> Separate your view layer from your application state.

It is actually separated, not from React though because React will need the state (data) at some point anyway. We'll go into more detail on that in the next post. To touch on it briefly here, shared application state exists on its own at the top level of the app, as a composition of stateful hooks. See here: https://github.com/Molecule-dev/molecule-app/tree/6e2456e216...

Every possible API request also exists on its own outside of anything React (view). See here: https://github.com/Molecule-dev/molecule-app/tree/6e2456e216...

Or for a more specific example, see this API resource route index: https://github.com/Molecule-dev/molecule-app/blob/6e2456e216...

I may be misunderstanding your complaints though. I appreciate your feedback.

loh··on Two custom React hooks
> how do people test this

You can find the tests for these hooks here: https://github.com/Molecule-dev/molecule-app/tree/6e2456e216...

Is that what you're asking about?

loh··on Two custom React hooks
These patterns are used all throughout an email app built and released earlier this year: https://www.tricepmail.app

We'll probably open source portions of it as well eventually, but first we're giving it a huge UI overhaul.

loh··on Two custom React hooks
Yeah. It depends on the data structure and how you'll use/update the state. `extendState` exists for when the situation calls for it. I avoid abusing it.
loh··on [dead]
Oh, thank you! I just updated the Docusaurus config and it's good now.
loh··on [dead]
For some reason HN keeps changing the domain from blog.molecule.dev to www.molecule.dev.

The URL should be: https://blog.molecule.dev/the-only-custom-react-hooks-we-use

loh··on Pico CSS Framework
Love the simplicity and minimalism! I'm a big believer in removing the bulk if possible. This does it very elegantly.

Also, the demo does a great job of highlighting exactly how it works.

loh··on Ask HN: What programming tutorial/course/article/blog would you like to see?
Maybe we can release the documentation and tutorials separately, and possibly some of it for free. It's much better if you have all of the code though!
loh··on Ask HN: What programming tutorial/course/article/blog would you like to see?
Thousands of hours have gone into building Molecule.dev over the past year, which itself is the culmination of tens of thousands of hours of experience, honing in on the absolute best tools and approaches. It makes no sense to give it all away for free. As much as I would love to live in a world where we could all freely share our hard work like this, people need to make a living somehow.

Starting this week, however, we'll be publishing regular articles about the inner workings, design decisions, and architecture, among other things. We may actually cover some of the core basics and release sample code with documentation. We'll probably publish at least 2 articles per week.

loh··on Ask HN: What programming tutorial/course/article/blog would you like to see?
I'm not sure if you will see my other comments in this thread, but please check them out. Molecule.dev covers all of this.
loh··on Ask HN: What programming tutorial/course/article/blog would you like to see?
> they will become outdated fairly quickly - or are not necessary even now for arbitrary "websites". The tooling for web development has become overly complex and we are now starting the trend back down to the basics instigated by projects such as esbuild.

To add to my other comment in this thread, as this relates to your particular comment, we try to keep Molecule.dev as up to date as possible. We cannot of course cover every piece of tech out there, but we attempt to cover what we think are the best tools available and will continue to exist and improve for many years to come.

It is definitely a very difficult problem to solve and will need constant maintenance, but I think it's worth it if it helps people get started building awesome, high quality things faster.

loh··on Ask HN: What programming tutorial/course/article/blog would you like to see?
This is actually exactly what Molecule.dev is all about. All of the documentation, guides, and tutorials are written with both teams and individuals in mind.

It includes detailed step-by-step guides for every little thing you need to know to develop, release (and rerelease) your app on every platform you've selected, using the tools you've selected. It also covers many edge cases and obscure issues which we know that you will probably run into.

It's written for developers of varying levels of experience so that any member of the team (present or future) can quickly jump on board and get started building and deploying.

It also includes a (very meta) guide which explains how to update the guide itself and regenerate new documentation as you (and your team) add to it for your own purposes.

loh··on Ask HN: What is your preferred/most commonly used stack and why?
Oh that's interesting. I didn't even know this existed. Thanks!
loh··on Ask HN: What is your preferred/most commonly used stack and why?
Yeah. I submitted it as a "Show HN" last Friday and received feedback from one person.
loh··on Ask HN: What is your preferred/most commonly used stack and why?
Sounds like we're on the same page.

I think TypeScript will actually overtake JavaScript eventually. It's just so nice to work with. JavaScript will of course always be supported and a prerequisite, but in terms of professional web and Node.js development on a broader scale, it's hard to imagine going back to writing plain JavaScript when TypeScript provides so much value for relatively little effort.

Also, I've updated the original title in light of your comment.

loh··on AWS Amplify Studio: Figma design to full-stack apps
Next to our FAQ section (or beneath it if you're on mobile), there are links to a demo app for every platform so you can try out all the functionality currently available. We'll be adding new options every week, depending on the input we get.

We'll also soon be rereleasing an email app using the Ionic option.

loh··on Magnus Carlsen wins longest world chess championship game of all time
Copying what I said in another reply: I'm referring to move 133, right after Ian moved his queen from H6 to H7, attacking the rook. Magnus ignores this and moves his E5 pawn to E6. https://www.youtube.com/watch?v=PWkBeTwbfj4&t=29890s
loh··on Magnus Carlsen wins longest world chess championship game of all time
I'm referring to move 133, right after Ian moved his queen from H6 to H7, attacking the rook. Magnus ignores this and moves his E5 pawn to E6. https://www.youtube.com/watch?v=PWkBeTwbfj4&t=29890s
loh··on AWS Amplify Studio: Figma design to full-stack apps
May I ask about your (and eunoia's) use case(s)?

Coincidentally, 2 hours ago I submitted Molecule.dev right here to HN (an hour before this AWS submission), a full-stack solution which aims to address all of the time consuming pain points of building (common functionality), maintaining, and releasing cross-platform apps.

It isn't a UI builder like AWS Amplify Studio, but I think we can do it better. We cover all of the most common use cases and are planning on adding more, all without any vendor lock-in or unnecessary convoluted abstractions.

loh··on Magnus Carlsen wins longest world chess championship game of all time
If he was aware of it, he would not have allowed it occur to begin with. He was counting on Magnus to move the rook and was very visibly surprised when Magnus left the rook in place.
loh··on Magnus Carlsen wins longest world chess championship game of all time
In hindsight, yes, it's basic for sure. But in the heat of the moment after 7 hours of thinking about nothing but chess, Ian obviously missed the potential fork and was visibly surprised that Magnus left his rook to be attacked.
loh··on Magnus Carlsen wins longest world chess championship game of all time
It was an absolutely incredible match to watch live. Historical.

My jaw dropped when Magnus ignored his rook being attacked at the end in favor of the potential fork with his knight. It is ultimately what led to the sure win.

loh··on “Click to subscribe, call to cancel” is illegal, FTC says
I always treat my customers/clients the way I would want to be treated, and it always seems to work out for the best. I've also given refunds to some customers without them asking for it first because I value their satisfaction more than I value a few dollars. There's no way to know for sure, but I suspect treating customers like this (like humans) increases retention and well-being, and not only for them, but for me (and my company) as well. It's called the golden rule for a reason. :)
loh··on Ask HN: What are you using for public documentation these days?
I think you and austincheney might be looking for [TypeDoc](https://typedoc.org/). See my comment here: https://news.ycombinator.com/item?id=29265856
loh··on Ask HN: What are you using for public documentation these days?
We use [TypeDoc](https://typedoc.org/) to generate documentation from all of our TypeScript. It combines type definitions with surrounding comment blocks for easily navigable, clean documentation.

For non-TypeScript codebases, we use [Docusaurus](https://docusaurus.io/).

I believe there are also plugins which can make TypeDoc output compatible with Docusaurus.

None of our docs are public at the moment, but a good example of documentation generated by TypeDoc would be Amazon's `aws-sdk`: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index...

loh··on Debit cards are hidden financial infrastructure
I remember this happening to me when I was a broke college student over a decade ago. I had to pay some bills and buy some things, and I expected a single overdraft fee, as I knew my exact account balance and the order of the purchases. I remember being hit with 3 (maybe 4) overdraft fees and immediately called my bank for an explanation. They gave me some bs like, "We reorder transactions to make sure your large ones go through first since they're probably more important." It was obvious at the time what they were really doing and why, which led me to eventually close my account with them and go with a local credit union.
loh··on Show HN: SlashApi – a web platform to build REST APIs without code
Got any more of these? I love historical comments like this, from HN especially. It is really interesting (and entertaining) to see an idea being dismissed as trivial, knowing that it ends up becoming the core of a multibillion dollar company.

I suppose in the case of HN, I could probably use hn.algolia.com to find submissions of startups we now know to be highly successful.

loh··on Police helicopter's 100mph chase with 'super sophisticated' drone near Tucson
I'm curious as to how you knew he's a meth dealer. I'm guessing he was being very overt about his operations?

That seems like it would be really entertaining, at least until he figures out you're paying close attention.

← PreviousPage 3 of 5Next →