Let's say I have an action and the action needs properties to be associated with it no matter what. This can be done through the: with method associated with any given action. For some reason, if you have an action that is using the .with method and pass that into the useSubmission hook, it seems to force result of the useSubmission hook to always return undefined for every property. What's even weirder is if you have the following code:
Use the .with() method to attach additional arguments to the action and associated the result to a new constant.
Pass the action to the useSubmission hook.
Expected behavior
Whether an action is defined with or without using the with method, I would expect the useSubmission hook to still work.
Screenshots or Videos
Platform
OS: [e.g. macOS, Windows, Linux]
Browser: [e.g. Chrome, Safari, Firefox]
Version: [e.g. 91.1]
Additional context
This is just an assumption, but this seems to have a similar effect if you don't pass an action a name whenever you're defining one. Perhaps the .with() method somehow removes the name of the action?
Describe the bug
Let's say I have an action and the action needs properties to be associated with it no matter what. This can be done through the:
with
method associated with any given action. For some reason, if you have an action that is using the.with
method and pass that into theuseSubmission
hook, it seems to force result of theuseSubmission
hook to always return undefined for every property. What's even weirder is if you have the following code:The
createEffect
is aware of any submission to the action, but still returns undefined to whatever property you're listening to.Your Example Website or App
https://stackblitz.com/edit/github-st5whm-swndrp?file=src%2Fcomponents%2FThemeToggle.tsx,src%2Froutes%2Findex.tsx
Steps to Reproduce the Bug or Issue
.with()
method to attach additional arguments to the action and associated the result to a new constant.useSubmission
hook.Expected behavior
Whether an action is defined with or without using the
with
method, I would expect the useSubmission hook to still work.Screenshots or Videos
Platform
Additional context
This is just an assumption, but this seems to have a similar effect if you don't pass an action a name whenever you're defining one. Perhaps the
.with()
method somehow removes the name of the action?