{"action":"created","issue":{"url":"https://api.github.com/repos/jwoudenberg/flyd-lift-react/issues/2","labels_url":"https://api.github.com/repos/jwoudenberg/flyd-lift-react/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/jwoudenberg/flyd-lift-react/issues/2/comments","events_url":"https://api.github.com/repos/jwoudenberg/flyd-lift-react/issues/2/events","html_url":"https://github.com/jwoudenberg/flyd-lift-react/issues/2","id":117308451,"number":2,"title":"setState warning","user":{"login":"qur2","id":143227,"avatar_url":"https://avatars.githubusercontent.com/u/143227?v=3","gravatar_id":"","url":"https://api.github.com/users/qur2","html_url":"https://github.com/qur2","followers_url":"https://api.github.com/users/qur2/followers","following_url":"https://api.github.com/users/qur2/following{/other_user}","gists_url":"https://api.github.com/users/qur2/gists{/gist_id}","starred_url":"https://api.github.com/users/qur2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qur2/subscriptions","organizations_url":"https://api.github.com/users/qur2/orgs","repos_url":"https://api.github.com/users/qur2/repos","events_url":"https://api.github.com/users/qur2/events{/privacy}","received_events_url":"https://api.github.com/users/qur2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-17T08:41:02Z","updated_at":"2015-12-02T19:51:11Z","closed_at":null,"body":"Hi,\r\n\r\nI'm using your library in a case that is a bit different than what I see in the tests: I have a higher component that builds subcomponents and injects streams into them. This means that the lifting happens inside in a `render()` call.\r\nThe problem is that while lifting a component, `.setState()` is called and React emits a warning because the state is mutated during a render cycle. Of course, it's only a warning, but it would be nice to get rid of it.\r\nSo far, the fix I found is to wrap the `.setState()` call in a function that checks that the new state is different from the component state. In order to do that, I use `ramda.equals()` which has the benefit to delegate to `state.equals` if there is any (and thus benefits from fast comparison with immutablejs for example). The drawback, obviously, is that the library would have ramda as a dependency. I find it acceptable since flyd already depends on it.\r\n\r\nWhat do you think? Would a PR be welcome?"},"comment":{"url":"https://api.github.com/repos/jwoudenberg/flyd-lift-react/issues/comments/161413199","html_url":"https://github.com/jwoudenberg/flyd-lift-react/issues/2#issuecomment-161413199","issue_url":"https://api.github.com/repos/jwoudenberg/flyd-lift-react/issues/2","id":161413199,"user":{"login":"jwoudenberg","id":1525551,"avatar_url":"https://avatars.githubusercontent.com/u/1525551?v=3","gravatar_id":"","url":"https://api.github.com/users/jwoudenberg","html_url":"https://github.com/jwoudenberg","followers_url":"https://api.github.com/users/jwoudenberg/followers","following_url":"https://api.github.com/users/jwoudenberg/following{/other_user}","gists_url":"https://api.github.com/users/jwoudenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/jwoudenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwoudenberg/subscriptions","organizations_url":"https://api.github.com/users/jwoudenberg/orgs","repos_url":"https://api.github.com/users/jwoudenberg/repos","events_url":"https://api.github.com/users/jwoudenberg/events{/privacy}","received_events_url":"https://api.github.com/users/jwoudenberg/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T19:51:11Z","updated_at":"2015-12-02T19:51:11Z","body":"It sounded convincing to me to, but sadly it didn't seem to correspond to reality ;). Anyway, because we seem to have some trouble reproducing it, I'll close this issue. Should you give it another try at some point and run into the same problem, I'd be happy to learn about it."}}