-
Notifications
You must be signed in to change notification settings - Fork 83
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
React 19 #607
Comments
We should indeed add support for React 19, however I still can't find information on what the expected JavaScript is. All the documentation, I find are using JSX syntax but for Feliz we need to output result of the JSX compilation. Currently this is what we are doing: If in JSX you write const MyButton = () => <button /> the JavaScript version of that was: const MyButton = () => /*#__PURE__*/React.createElement("button", null); The equivalent in Feliz is [<ReactComponent>]
let MyButtion () =
Html.button [] which compiles to import { createElement } from "react";
import React from "react";
export function MyButtion() {
return createElement("button", {});
} Because of that I don't know yet if adding support for React 19, will be a breaking change or not. It is also important to note that the code currently generated by Feliz is not even yet up to the latest version of what React does. Since React 18 (I think), the recommended generated JavaScript is: import * as JsxRuntime from "react/jsx-runtime";
var MyButton = JsxRuntime.jsx("button", null); This is for example, the reason why when using Fast Refresh with Vite people need to set |
Looking at the changes in React 19, nothing strikes me as breaking from Feliz point of view. That said, current Feliz version defines its react dependency (via a transitive reference to |
I think the easiest way to see if something is broken or not would be for someone to upgrade to React 19 and we will see if React complains or something breaks :) |
Hi, React 19 RC has been released a few weeks ago, with some breaking changes.
How will the soon to be released React 19 impact Feliz? Is React 19 compatibility planned?
The text was updated successfully, but these errors were encountered: