Skip to content
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

Fix render bug causing changes to the app state not being reflected #342

Merged
merged 1 commit into from
Apr 21, 2015

Conversation

alessandrod
Copy link
Contributor

Avoid potentially nesting -set-property! calls for the :skip-render-root root
property. Makes it so that changes to the root state done while the root is
being rendered get applied immediately (in the next raf callback).

Avoid potentially nesting -set-property! calls for the :skip-render-root root
property. Makes it so that changes to the root state done while the root is
being rendered get applied immediately (in the next raf callback).
@alessandrod
Copy link
Contributor Author

Here's an example demonstrating the issue. It should render at every rAF callback but it only renders twice.

(defn c [props owner]
  (reify
    om/IRender
    (render [_]
      (om/transact! props :i inc)
      (dom/span nil (:i props)))))

@alessandrod
Copy link
Contributor Author

Ping?

@swannodette
Copy link
Member

@alessandrod thanks for the reminder. Merging.

swannodette added a commit that referenced this pull request Apr 21, 2015
Fix render bug causing changes to the app state not being reflected
@swannodette swannodette merged commit fdee12c into omcljs:master Apr 21, 2015
@lenaschoenburg
Copy link

Would you consider releasing a version with this fix? Unfortunately this is blocking for us.

@bensu
Copy link
Contributor

bensu commented Jun 30, 2015

@dignati for what it's worth, I just published a version of the library that contains the unpublished fixes (including this one).

@lenaschoenburg
Copy link

Thanks, I actually did the same. I think it's really unfortunate that this
is still an open issue. Most newcomers to Om/Clojurescript would probably
have a hard time figuring out that it's a bug in Om, not their mistake.

Sebastian Bensusan notifications@github.com schrieb am Di., 30. Juni 2015
15:59:

@dignati https://github.com/dignati for what it's worth, I just
published https://clojars.org/bensu/om a version of the library that
contains the unpublished fixes (including this one).


Reply to this email directly or view it on GitHub
#342 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants