When using react-strict-dom with TypeScript, using VarGroup with css raises this error.
Expected behavior
No type errors.
Steps to reproduce
Use the tokens.stylex.ts from RSD's example in a newly created TypeScript project, with fresh @stylexjs/stylex installation (this causes a version mismatch).
Replacing import { css } from "react-strict-dom"; with import css from "@stylexjs/stylex"; fixes the issue of course. It's the import from different module (react-strict-dom instead of @stylexjs/stylex) that causes the error.
This is actually a version mismatch error. it looks like react-strict-dom is using stylex 0.6.0, but my stylex dependency is at 0.6.1. I think moving stylex to peer dependencies would be the right call here but maybe there's a reason it's a direct dependency. If it can't be moved to peer deps, then some sort of warning or note or compatibility table would be nice to remind the user to install the right versions.
Also, maybe unrelated question: Is the css export from react-strict-dom necessary? Couldn't it be made to just work with normal stylex imports?
Describe the issue
When using react-strict-dom with TypeScript, using
VarGroup
withcss
raises this error.Expected behavior
No type errors.
Steps to reproduce
Use the
tokens.stylex.ts
from RSD's example in a newly created TypeScript project, with fresh@stylexjs/stylex
installation (this causes a version mismatch).Test case
No response
Additional comments
Replacing
import { css } from "react-strict-dom";
withimport css from "@stylexjs/stylex";
fixes the issue of course. It's the import from different module (react-strict-dom
instead of@stylexjs/stylex
) that causes the error.This is actually a version mismatch error. it looks like
react-strict-dom
is using stylex0.6.0
, but my stylex dependency is at0.6.1
. I think moving stylex to peer dependencies would be the right call here but maybe there's a reason it's a direct dependency. If it can't be moved to peer deps, then some sort of warning or note or compatibility table would be nice to remind the user to install the right versions.Also, maybe unrelated question: Is the css export from
react-strict-dom
necessary? Couldn't it be made to just work with normal stylex imports?Thank you.