Open ps73 opened 9 months ago
Thank you for the info. I will investigate v2 in the next days and publish a new version.
What happens if you ignore the peer dependency warning? Does Modular Forms still work as expected in development and production mode?
I think a babel plugin is needed to get v2 working correctly.
https://github.com/preactjs/signals/tree/main/packages/react#babel-transform
Does Modular Forms still work as expected if you ignore the peer dependency warning? I am asking to find out if this is only necessary for end users.
It didn't work for me. For example {field.error.value}
didn't rerender on validation error.
After you added the Bable plugin?
Yeah added babel plugin to vite config inside the react plugin and couldn't make it work fastly. But I had not that much time to debug it.
Ok. Feel free to add the Bable plugin to this repo in packages/react
and see if it works.
I updated the @preact/signals-react
dependency from ^1.3.4
to ^2.0.0.
and the pnpm install
gave the following warnings:
WARN Issues with peer dependencies found
playgrounds/qwik
└─┬ vite-tsconfig-paths 4.3.1
└─┬ tsconfck 3.0.1
└── ✕ unmet peer typescript@^5.0.0: found 4.9.5
playgrounds/solid
└─┬ solid-start 0.2.26
└── ✕ unmet peer vite@^4.1.4: found 3.2.5
website
└─┬ solid-start 0.2.26
└── ✕ unmet peer vite@^4.1.4: found 3.2.5
However, the React Playground seems to be working fine. I don't see a problem with field errors.
Cannot confirm this @awhitford.
When passing field.error.value
down as a prop, it will not be changed when using v2 with or without the babel plugin:
https://stackblitz.com/edit/vitejs-vite-otlhs7?file=src%2FApp.tsx
When using v1.3.8 it works as expected: https://stackblitz.com/edit/vitejs-vite-7tjm6f?file=src/App.tsx
I will check and merge PR #191 tomorrow or in the next few days.
I am using preact signals in my react app und currently using v2. This lib uses v1. It would be great if @preact/signals could be upgraded to v2.