Skip to content

Upgrade to Next.js 15 and React 19#5

Open
SanjoSolutions wants to merge 7 commits intousebasejump:mainfrom
SanjoSolutions:next-15
Open

Upgrade to Next.js 15 and React 19#5
SanjoSolutions wants to merge 7 commits intousebasejump:mainfrom
SanjoSolutions:next-15

Conversation

@SanjoSolutions
Copy link
Copy Markdown

@SanjoSolutions SanjoSolutions commented Nov 4, 2024

Here's some work on the upgrade. There seem to be potentially still some bugs introduced which I plan to look into and fix.
Also some indirect dependencies seems to declare a peer dependency for React up to version 18 only.
This PR is related to issue #4.

Fixes #4.

useActionState

useActionState seems to have such behavior that the form input values "reset" after form submission. I.e. when a defaultValue is set then after submission the input has the defaultValue again. To make it work in such way that the user changes stay in the inputs, one can use the state that is returned from useActionState. This is the basis for the change(s) regarding putting useActionState outside of the SubmitButton and instead in the component where the form is declared, so that the state can be used for the the form input default values.

@SanjoSolutions
Copy link
Copy Markdown
Author

SanjoSolutions commented Nov 5, 2024

I have fixed the bugs that I have seen. The areas that have changed still require more testing. Maybe I set up automated tests.

Also adds a CREDITS.md file for license compliance (I have copied some code from the documentation of the mentioned projects).
@SanjoSolutions SanjoSolutions marked this pull request as draft November 6, 2024 22:35
@SanjoSolutions
Copy link
Copy Markdown
Author

I have tested the app manually. Everything seems to work as before.

@SanjoSolutions SanjoSolutions marked this pull request as ready for review November 7, 2024 01:59
@SanjoSolutions SanjoSolutions changed the title Some work on upgrading to Next.js 15 and React 19 Upgrade to Next.js 15 and React 19 Nov 7, 2024
@SanjoSolutions
Copy link
Copy Markdown
Author

Regarding formatting differences with most of the codebase the plan is to set-up Prettier after the merge and format the codebase automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Next.js 15

1 participant