News for hackers. Stuff that matters.

jack_hanford

Re:Rich Text Editor for React on Wednesday June 22, 2022 @10:22AM (#31836339)
Depending on how far along you are, I'd recommend checking out: https://lexical.dev/

I'm in the process of migrating my companies RTE from Slate to Lexical.

I've been able to remove thousands of lines of custom code and increase the performance and reliability

Re:Show HN: Trends – A GitHub trending PWA on Wednesday July 25, 2018 @01:15AM (#17607037)
Looks like IE mobile doesn't support CSS Grid!
Re:Show HN: Trends – A GitHub trending PWA on Tuesday July 24, 2018 @07:10PM (#17605659)
yeah I added a hard limit based on a relatively arbitrary max-width of 1400px.

I got all of the responsiveness for free using CSS grid! Definitely recommend checking it out if you haven't yet

Figured something like this would be a little overwhelming https://imgur.com/nx3hISb

Re:Show HN: Trends – A GitHub trending PWA on Tuesday July 24, 2018 @06:16PM (#17605397)
just rolled out a fix for this on firefox for mac, i don't have a windows computer to test the fix on...

if you do a hard refresh this issue may be resolved! ¯\_(ツ)_/¯

Re:Show HN: Trends – A GitHub trending PWA on Tuesday July 24, 2018 @06:15PM (#17605389)
May need to do a hard refresh because of the aggressive caching, but this should be fixed now!
Re:Show HN: Trends – A GitHub trending PWA on Tuesday July 24, 2018 @05:54PM (#17605283)
I'm using the search API, so unlikely anything different than Github's trending stuff that is already there.

The UI is a little better though ;)

Re:Show HN: Trends – A GitHub trending PWA on Tuesday July 24, 2018 @05:53PM (#17605271)
hmm, thanks for mentioning the select options .. should be an easy fix.

As for the page reloading I agree, but this exercise was specifically to make an application with the absolute minimum amount of client side code.

HTMl5 Forms do the job pretty well! :)

Re:Show HN: Trends – A GitHub trending PWA on Tuesday July 24, 2018 @04:46PM (#17604767)
Correct!

The way that is achieved is pretty neat, Next.js has a <Document />[1] component that you can extend. This Document is essentially your application shell that is used when server side rendering.

Here is the trends Document component[2] where you can see I'm simply omitting `NextScripts` which ends up being the frontend bundle with react + application code

[1] https://github.com/zeit/next.js#custom-document

[2] https://github.com/hanford/trends/blob/master/pages/_documen...

Re:Show HN: Trends – A GitHub trending PWA on Tuesday July 24, 2018 @03:08PM (#17604018)
It's certainly interesting. This kind of development has gone full circle where the methodologies are back to where it was years ago.

The issues that really large JS bundles can cause are really hard to solve (bloated sizes, but also parse time of the bundles). There are a lot of tools to help mitigate those like code splitting, but it's really challenging once things get big.

When I wanted to achieve a 100 in my chrome performance audit, I simply couldn't include React.

I think React adds a tremendous amount of value from the ecosystem, the constant improvements and updates .. and the mindset that developers have when building out react applications. (component model, etc)

I think for any really large application with lots of client side interactions or async data / data management, my solution would become unwieldy.

But for smaller applications that maybe don't need to do as much, (in the above case we're simply registering some event listeners to submit a form) or landing pages or the like .. the above solution would work very well.

Re:Show HN: Trends – A GitHub trending PWA on Tuesday July 24, 2018 @03:02PM (#17603961)
If I understand correctly you could build something like that but I'm not currently persisting any data from github which is something I'd need to add first.

I'm simply getting this data from Github and then caching the rendered result on the cloudflare CDN layer, the rendered page data in memory in node, and additionally the GraphQL query in memory

Show HN: Trends – A GitHub trending PWA

Over the past few weeks I've been working on a small application to view trending repos on GitHub. I built the PWA[1] with React, Next.js and GraphQL .. but what's interesting is the application is only using React server side, meaning the client side javascript is only a few lines code adding some event listeners and registering a service worker for offline capability. This helped me achieve a...

( Read More... | 33 comments | 95 points | on HN )
Re:Ask HN: Can we add collapsing boxes to comments? on Wednesday March 30, 2016 @09:49PM (#11394477)
I use this chrome extension ->

https://chrome.google.com/webstore/detail/hn-special-an-addi...

You have to disable their hideous theme, but it adds collapsible comments and infinite scroll on the home page which is pretty neat.

Re:Show HN: Facebook data visualizer on Monday December 15, 2014 @03:01PM (#8754050)
unfortunately I haven't been able to test a data set that isn't english :(

And right, that is kind of a known bug. I discovered earlier today when a friend ran it.

Thank you for the feedback!

Re:Show HN: Facebook data visualizer on Monday December 15, 2014 @02:18PM (#8753759)
Thanks for the feedback guys, I'll add screenshots right now

Older »