Skip to content

Conversation

coot
Copy link

@coot coot commented Jul 12, 2017

forceUpdate. This PR includes two versions: with and without the callback argument:

forceUpdate :: forall eff props state. ReactThis props state -> Eff eff Unit

forceUpdateCb :: forall eff props state. ReactThis props state -> Eff eff Unit -> Eff eff Unit

src/React.purs Outdated
createClassStateless \props ->
k props (childrenToArray (unsafeCoerce props).children)

foreign import forceUpdateImpl :: forall eff props state.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this one can be implemented in terms of the other using pure unit?

src/React.js Outdated
}
exports.createClass = createClass;

function forceUpdateImpl(this_) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer used, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just forgot to push all changes.

@ethul
Copy link
Contributor

ethul commented Aug 10, 2017

Looks good to me. @paf31 Good for me to do the merge?

@paf31
Copy link
Contributor

paf31 commented Aug 10, 2017

👍 If you're happy, go ahead please. Sorry I haven't had time to review PRs as much lately.

@ethul
Copy link
Contributor

ethul commented Aug 10, 2017

No problem. Thanks!

@ethul ethul merged commit 7cb1b53 into purescript-contrib:master Aug 10, 2017
@coot coot deleted the force-update branch August 10, 2017 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants