Skip to content

Force update #103

New issue

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

Merged
merged 4 commits into from
Aug 10, 2017
Merged

Force update #103

merged 4 commits into from
Aug 10, 2017

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
@@ -335,6 +340,25 @@ createClassStateless' k =
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
@@ -122,6 +122,20 @@ function createClass(spec) {
}
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