Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

spring-media/preact-next-suspense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

preact-next-suspense

As of version 8.x Next does not work together with Preact anymore because it utilizes Suspense.

@sventschui is currently working on a PR to implement Suspense for Preact.

This project is a monorepo with 3 packages

  • next which is a Next.js project that uses next-with-preact-x as a plugin
  • next-with-preact-x which is a re-implementation of @zeit/next-preact using the PR branch of Preact X containing Suspense
  • preact which is a git submodule pointing to the branch of Preact X containing Suspense

now if you run

yarn && cd next && yarn dev

It should run next using preact from the submodule and @sventschui implenentation of suspense and you should be able to see <div>Welcome to Next.js!</div> as a rendered page.

Unfortunately this does not quite work yet, we end up having a page that says

<!DOCTYPE html><undefined></undefined>

🔥 UPDATE 🔥

@sventschui found that the problem is / was the usage of preact-render-to-string@4.x. Upgrading to 5.x / @next fixed this bug.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published