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

[miniplex-react] Doesn't work in Strict mode #171

Closed
itsdouges opened this issue Oct 10, 2022 · 6 comments · Fixed by #175
Closed

[miniplex-react] Doesn't work in Strict mode #171

itsdouges opened this issue Oct 10, 2022 · 6 comments · Fixed by #175
Assignees
Labels
bug Something isn't working

Comments

@itsdouges
Copy link

When running in strict mode you'll get this error: Tried to add components to an entity that is not managed by this world.. It's most likely from effects double rendering.

Broken sandbox: https://codesandbox.io/s/strict-mode-doesnt-work-spxtev?file=/src/index.tsx
Working sandbox: https://codesandbox.io/s/entity-deleted-when-updating-component-cmk0og?file=/src/index.tsx

@hmans
Copy link
Owner

hmans commented Oct 10, 2022

Hi, and thanks for submitting this issue! I will look into it. I did some testing with Strict Mode that didn't reveal any issues, but maybe I was testing the wrong things.

@hmans hmans self-assigned this Oct 10, 2022
@hmans hmans added the bug Something isn't working label Oct 10, 2022
@hmans
Copy link
Owner

hmans commented Oct 10, 2022

I think I might have introduced this bug with a last-minute change I made before 1.0.0. :( Working on a fix.

@hmans hmans linked a pull request Oct 10, 2022 that will close this issue
@hmans
Copy link
Owner

hmans commented Oct 10, 2022

I have a WIP fix in #175. It doesn't make me particularly happy, but it works. The PR also adds a small test app (for strict mode in particular) that is similar to your sandbox. Can you give it a quick glance please?

@hmans
Copy link
Owner

hmans commented Oct 10, 2022

I'm reopening this because the issue we've discussed in #174 is clearly a Strict Mode issue that needs to be fixed.

@hmans hmans reopened this Oct 10, 2022
@hmans
Copy link
Owner

hmans commented Oct 10, 2022

Alright, I can't solve this today, I'm about to lose the entire day to this and have other things that need doing first. I will revisit this soon with a clear head. :(

@hmans hmans added this to the Miniplex 2.0.0 milestone Oct 15, 2022
@hmans
Copy link
Owner

hmans commented Oct 15, 2022

The good news is that this is solved.

The bad news is that this is solved in the upcoming new 2.0. :-)

I'm going to close this ticket, even though it'll be another couple of days before I release a 2.0 final. I've been pushing prerelease builds, though, and will update the documentation this weekend.

@hmans hmans closed this as completed Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants