#why in mantine repo use "jsx": "react"?
8 messages · Page 1 of 1 (latest)
react-jsx just means that it uses the React 17+ transform rather the original createElement way.
Maybe it makes a difference for the end user? But I assume the reason is just because that is how it started in Mantine and it just hasn't been changed
So, there are no hidden problems with “react-jsx”? 🤔 and we can use it safely? I just worry, maybe this mode have some hidden issues, and i just don’t know about them 😅
No, since react 17 and later react-jsx is the default. It's just the new way of transforming what <HelloWorld /> turns into in the final JS file.
react: export const HelloWorld = () => React.createElement("h1", null, "Hello world");
react-jsx: export const HelloWorld = () => _jsx("h1", { children: "Hello world" });
It should have some performance improvements and other small things, but most notable difference for you as a user is that it means you don't need to do import React from 'react' anymore
Thank you, for information! I understand the difference. I don’t understand, why mantine doesn’t use it, maybe it’s intentionally? 🤔 if not, that’s fine for me
We do not use it because it does not work in monorepo
This is interesting 🤔 why this not work in monorepo? 🤔 we use rush.io and clean pnpm workspaces, is this not works for us too?
I do not know, it just does not work