Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrades to Next.js 15 & React 19 #49

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@react-three/drei": "^9.101.0",
"@react-three/fiber": "^8.15.19",
"@react-three/fiber": "^9.0.0-beta.1",
"@vercel/analytics": "^1.2.2",
"@vercel/speed-insights": "^1.0.10",
"color": "^4.2.3",
Expand All @@ -31,12 +31,12 @@
"jose": "^5.2.2",
"leva": "^0.9.35",
"lodash": "^4.17.21",
"next": "14.1.2",
"next": "15.0.0-rc.0",
"next-mdx-remote": "^4.4.1",
"postcss": "^8.4.35",
"react": "18.2.0",
"react": "19.0.0-rc-f994737d14-20240522",
"react-children-utilities": "^2.10.0",
"react-dom": "18.2.0",
"react-dom": "19.0.0-rc-f994737d14-20240522",
"react-error-boundary": "^4.0.12",
"react-ink": "^6.5.4",
"react-transition-group": "^4.4.5",
Expand Down Expand Up @@ -65,5 +65,10 @@
"prettier": "^3.2.5",
"puppeteer": "^22.3.0",
"ws": "^8.18.0"
},
"pnpm": {
"patchedDependencies": {
"leva": "patches/leva.patch"
}
}
}
22 changes: 22 additions & 0 deletions patches/leva.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/dist/vector-plugin-6f82aee9.esm.js b/dist/vector-plugin-6f82aee9.esm.js
index 8bf534d96705c0bc5d21f7feeeaa203f94778a30..0966550d0df1583309d0c608b9650fd20f6fad11 100644
--- a/dist/vector-plugin-6f82aee9.esm.js
+++ b/dist/vector-plugin-6f82aee9.esm.js
@@ -1,4 +1,4 @@
-import ReactDOM from 'react-dom';
+import { createRoot } from 'react-dom/client';
import React, { createContext, useContext, useRef, useCallback, useState, useEffect } from 'react';
import * as P from '@radix-ui/react-portal';
import { dequal } from 'dequal/lite';
@@ -461,10 +461,7 @@ const debounce = (callback, wait, immediate = false) => {
const multiplyStep = event => event.shiftKey ? 5 : event.altKey ? 1 / 5 : 1;

function render(element, container) {
- const error = console.error;
- console.error = () => {};
- ReactDOM.render(element, container);
- console.error = error;
+ createRoot(container).render(element);
}

function mergeRefs(refs) {
Loading