We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have following code
[@react.component] let make = () => { let (_, dispatch) = React.useReducer((state, _) => state + 1, 0); <button onClick={_e => dispatch(1)}> {ReasonReact.string("+")} </button>; };
which compiles to
function App(Props) { var match = React.useReducer((function (state, param) { return state + 1 | 0; }), 0); var dispatch = match[1]; return React.createElement("button", { onClick: (function (_e) { return Curry._1(dispatch, 1); }) }, "+"); }
Curry for dispatch is not needed, can this be fixed or it's limited by something else?
The text was updated successfully, but these errors were encountered:
As my limited knowledge for bucklescript, maybe dispatch should be typed as ([@bs] 'action => unit)
([@bs] 'action => unit)
Sorry, something went wrong.
This PR would address this issue #529
cool, hope your pr will be merged soon
#529 got messed up. It was merged by accident, but none of its code was actually added to the master branch. #551 re-opened it.
Successfully merging a pull request may close this issue.
I have following code
which compiles to
Curry for dispatch is not needed, can this be fixed or it's limited by something else?
The text was updated successfully, but these errors were encountered: