Support function at the form action prop

Open
#892 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
react
Domain
frontend

Research direction

Start by locating the form binding and its action prop, then review how the current string-only action is represented. Use the issue's string and function examples to define the supported inputs, and consider the noted breaking-change concern. Done means a form can use a function action while preserving the intended string behavior.

Written by the indexing model from the issue text.

Description

Description

reason-react form still don't support function on the action prop.

Ideas

  • The prop could accept polivars (with mel.unwrap) instead of only string (BREAKING_CHANGE):
     <form action={`String("/foo")} />
     <form action={`Function((formData) => doSomething(formData))}
    
  • Create a new prop for it. 🙃 (Not possible)
Dominant language
Reason
Stars
3.3k
Forks
344
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reasonml/reason-react

All issues in reasonml/reason-react

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.