You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have also raised it as a remix issue. I think it may be a type definition problem on the remix side. remix-run/remix#9374
The text was updated successfully, but these errors were encountered:
coji
changed the title
Remix single fetch: returning conform.reply() with action results in type never.
Remix single fetch: returning submission.reply() with action results in type never.
May 4, 2024
I've received feedback from several users about an issue with SubmissionResult's prop Result<string, unknown>. The unknown type is problematic because it introduces uncertainty about serializability by turbo-stream, which could lead to runtime errors. remix-run/remix#9374 (comment)
To address this, it's recommended to replace unknown with a more specific type that turbo-stream can reliably serialize. This will improve type safety and prevent potential issues.
However, I'm not quite sure how to best implement this change while maintaining compatibility and avoiding any unintended consequences. I would greatly appreciate your guidance on the most appropriate way to refactor the code to resolve this problem.
I've updated to remix v2.9.2 and the type error is gone,
However, the newly introduced defineAction / defineLoader still seems to cause type errors due to Result<string, unknown>.
Describe the bug and the expected behavior
remix-run/remix#9374
Conform version
v1.1.3
Steps to Reproduce the Bug or Issue
https://stackblitz.com/~/github.com/coji/conform-on-remix-single-fetch
What browsers are you seeing the problem on?
Chrome
Screenshots or Videos
Additional context
I have also raised it as a remix issue. I think it may be a type definition problem on the remix side.
remix-run/remix#9374
The text was updated successfully, but these errors were encountered: