Closed StorytellerCZ closed 2 years ago
I'll take a look. They are shipping useMutableSource with this. I'll look in to that as well.
This worked for me. I tried it with the unit tests, and I tried with a project with no trouble too. Can you provide more of a reproduction?
Ok, will look into it, maybe it is something stupid in my code base.
BTW, useMutableSource
looks like a total pain to use... I don't know if it's appropriate for Meteor, but we may be able to borrow some techniques for how to handle "updates during render". I'm still planning to look in to that, but our general approach with useFind
and useTracker
is probably better/easier to use than something based on useMutableSource
.
@StorytellerCZ could you provide a reproduction? It would be nice to see what is going wrong in your case.
There seems to be a reproduction in #354 - @StorytellerCZ Can you verify if that demonstrates the same issue you saw?
I have just tested with released version of React 18 and so far I'm not running into any issues. It might also be that when it comes to user stuff I have moved to the new official packages. I will take a look on #354 reproduction to see if it is similar to what I have been experiencing.
@CaptainN after a quick read through the issue I think it is the same. I'm closing this issue in favor of #354
I did I quick test with React 18 RC and ran into issues of constant refreshes in
withTracker
HOC which I use to create my user context, so I just wanted to open this issue to get some visibility in the coming React 18 upgrade to see what steps needs to be taken to upgrade and what issues have others encountered.