code-forge-io / code-forge-io/remix-toast

double request aftar form submission

Open
#37 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
262
Forks
16
PR merge metrics
No merged PRs in 30d

Description

hi, i got a problem if toast is set to loader in ```root.tsx``` file there is double request after submit

## example code
```javascript
export function action() {
return redirectWithToast('/sign-in', { message: 'User created successfully', type: 'success' }, {
status: 201,
})
}

export default function SignUp() {
return (

Test

)
}
```

Image

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with root.tsx and the action/Form example in the issue, reproducing the submission with the toast set to loader. Trace the redirectWithToast flow and request handling to identify why submission results in two requests. Done means the example submits once while retaining the intended toast behavior; no test file is mentioned.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
full-stack
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.