huozhi

huozhi

build things in minimalism

Member Since 8 years ago

@vercel, Berlin

Experience Points
347
follower
Lessons Completed
129
follow
Lessons Completed
1.2k
stars
Best Reply Awards
74
repos

1395 contributions in the last year

Pinned
⚡ zero config bundler for js/ts/jsx library
⚡ Auto repositioning overlay component for react
⚡ A next.js plugin turns jsx components as image.
⚡ 🌀 parse and convert html string to anything
⚡ React Hooks for Data Fetching
⚡ Pretty and customizable svg spinners for React.js
Activity
Jan
18
1 day ago
Activity icon
issue

huozhi issue comment vercel/next-rsc-demo

huozhi
huozhi

How to rerender RSC?

How can we rerender(refetch) RSC to show updated data?

huozhi
huozhi

@Regaron We have undocumented API now in latest version of next.js could let you do that. Docs update will come soon.

Example

import { unstable_useRefreshRoot } from 'next/rsc'

export deafult function Page() {
   cons refresh = unstable_useRefreshRoot()
   // ...
   return <Content><button onClick={refresh}>update</button></Content>
}

Would love to hear the feedback from you

Activity icon
delete

huozhi in huozhi/next.js delete branch rsc/shared-components

deleted time in 5 hours ago
pull request

huozhi pull request vercel/next.js

huozhi
huozhi

feat: treat shared components as server components

  • Treate shared components in RSC as server components
  • Allow server components to import shared components
  • All client components imports should be treated as module reference (except node_modules so far)
pull request

huozhi merge to vercel/next.js

huozhi
huozhi

Fix pre-compiled check from copying react-refresh-utils

This updates to not commit the copied react-refresh-utils files as they will change anytime a new version is published.

Fixes: https://github.com/vercel/next.js/runs/4855748491?check_suite_focus=true

pull request

huozhi merge to vercel/next.js

huozhi
huozhi

Fix pre-compiled check from copying react-refresh-utils

This updates to not commit the copied react-refresh-utils files as they will change anytime a new version is published.

Fixes: https://github.com/vercel/next.js/runs/4855748491?check_suite_focus=true

pull request

huozhi merge to vercel/next.js

huozhi
huozhi

Fix pre-compiled check from copying react-refresh-utils

This updates to not commit the copied react-refresh-utils files as they will change anytime a new version is published.

Fixes: https://github.com/vercel/next.js/runs/4855748491?check_suite_focus=true

push

huozhi push vercel/next.js

huozhi
huozhi

Disable cache for rsc pages (#33438)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit sha: c367c72d28620c796d7c1f8158cf94224bf8a337

push time in 8 hours ago
Activity icon
delete

huozhi in huozhi/next.js delete branch disable-rsc-cache

deleted time in 8 hours ago
pull request

huozhi pull request vercel/next.js

huozhi
huozhi

Disable cache for rsc pages

Problem

When you navigate between pages, browsers will use bfcache to manage the page cache. RSC are fully dynamic and requires streaming to fill the suspended "content holes" before cache is well supported. But safari bfcache will stop it somehow, even chrome works well.

For safari it will only disable bfcache on when the cache header matches no-cache or no-store

x-ref: https://webkit.org/blog/427/webkit-page-cache-i-the-basics/

allowing HTTPS pages to be cached unless their response headers include “cache-control: no-store” or “cache-control: no-cache” which has become the canonical way for a selective organization to secure your content.

started
started time in 9 hours ago
pull request

huozhi pull request vercel/next.js

huozhi
huozhi

Disable cache for rsc pages

Problem

When you navigate between pages, browsers will use bfcache to manage the page cache. RSC are fully dynamic and requires streaming to fill the suspended "content holes" before cache is well supported. But safari bfcache will stop it somehow, even chrome works well.

For safari it will only disable bfcache on when the cache header matches no-cache or no-store

x-ref: https://webkit.org/blog/427/webkit-page-cache-i-the-basics/

allowing HTTPS pages to be cached unless their response headers include “cache-control: no-store” or “cache-control: no-cache” which has become the canonical way for a selective organization to secure your content.

Activity icon
created branch

huozhi in huozhi/next.js create branch disable-rsc-cache

createdAt 10 hours ago
started
started time in 10 hours ago
push

huozhi push vercel/next-rsc-demo

huozhi
huozhi

separate load item and comments

commit sha: 81f36d2382f840517f9dedb800271ce4821c9db8

push time in 11 hours ago
push

huozhi push vercel/next-rsc-demo

huozhi
huozhi

Remove _app and _document pages

huozhi
huozhi

Merge pull request #18 from vercel/rm-pages

huozhi
huozhi

commit sha: 4b667f85ed810ec428be9f1db2610cfa4a60bff1

push time in 11 hours ago
Activity icon
issue

huozhi issue Brooooooklyn/swc-node

huozhi
huozhi

Consider using swc/core as peer dependency

If user installs @swc-node/jest and @swc/core at the same time it might result into duplicated versions of @swc/core which will increase the installation size a lot.

push

huozhi push huozhi/fpoint

huozhi
huozhi

polish site (#8)

  • docs: tw card

  • one gh link

commit sha: c0fb8cbed6c378b10ad2ffdeecc3a89d1c8b9cb9

push time in 1 day ago
Jan
17
2 days ago
push

huozhi push huozhi/fpoint

huozhi
huozhi

polish site (#8)

  • docs: tw card

  • one gh link

commit sha: a5e6f6bcee71d468fdf514be8efa5b5c60502dbe

push time in 1 day ago
push

huozhi push vercel/swr-site

huozhi
huozhi

Update cache documentation link (#218)

The current cache provider link is broken and needs to be updated to the new link.

commit sha: e1ffbca5417ea2fedd8b9c1b62de13422676a0b7

push time in 1 day ago
pull request

huozhi pull request vercel/swr-site

huozhi
huozhi

Update cache documentation link

The current cache provider link is broken and needs to be updated to the new link.

pull request

huozhi merge to vercel/swr-site

huozhi
huozhi

Update cache documentation link

The current cache provider link is broken and needs to be updated to the new link.

push

huozhi push vercel/swr-site

huozhi
huozhi

Fix cache link (#219)

The cache link is broken on this page. This change references the updated cache docs.

commit sha: 666e531567215ee6c784d20a0d74df89dc78bfc1

push time in 1 day ago
pull request

huozhi pull request vercel/swr-site

huozhi
huozhi

Fix cache link

The cache link is broken on this page. This change references the updated cache docs.

pull request

huozhi merge to vercel/swr-site

huozhi
huozhi

Fix cache link

The cache link is broken on this page. This change references the updated cache docs.

Activity icon
delete

huozhi in huozhi/fpoint delete branch tw-card

deleted time in 1 day ago
push

huozhi push huozhi/fpoint

huozhi
huozhi

polish site (#8)

  • docs: tw card

  • one gh link

commit sha: 2f85360c93ae63291f11369e53aec1a7f6f4f562

push time in 1 day ago
pull request

huozhi pull request huozhi/fpoint

huozhi
huozhi

polish site

  • rename tw card
  • use react 18
pull request

huozhi pull request huozhi/fpoint

huozhi
huozhi

polish site

  • rename tw card
  • use react 18
Previous