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

Will onModelChange cause all the components rendered inside the factory to be re-rendered after modifying the model? #456

Open
daigang1228 opened this issue Sep 25, 2024 · 5 comments

Comments

@daigang1228
Copy link

daigang1228 commented Sep 25, 2024

Describe the bug

Will onModelChange cause all the components rendered inside the factory to be re-rendered after modifying the model?

Your Example Website or App

Steps to Reproduce the Bug or Issue

Modify the layout so that you can see the content under each tab flashing

Expected behavior

Modifying the layout should not re-render the content of each tab

Operating System

mac

Browser Type?

chrome

Browser Version

128.0.6613.120

Screenshots or Videos

Additional context

No response

@nealus
Copy link
Collaborator

nealus commented Sep 25, 2024

The model should be set, then mutated using Actions, rather than recreated for each change in the layout.

The optional onModelChange() callback is to allow processing after the model has changed (due to an action).

@daigang1228
Copy link
Author

daigang1228 commented Sep 25, 2024

@nealus
But there will be no issue in v0.7.3 version
The re-rendering problem will only occur in 0.8.1

@ericsvendsen
Copy link

Can confirm. Was running v0.7.15 and everything was fine. Upgraded to v0.8.1 and my app is completely hosed with "maximum update depth exceeded" error messages. Checked the changelog for breaking changes for v0.8, and nothing at all is mentioned that points to this issue. I'm fine to stay on 0.7.15 for now, but any further guidance here would be much appreciated. Thank you!

@rob-myers
Copy link

@nealus in [email protected] you can recreate the Model with different JSON to e.g.

  • remove tab(s)
  • add tabs(s)
  • provide tab(s) with different props

all in-one-go, without remounting any existing tabs.

This is a very helpful feature missing from [email protected].

@bvanseg
Copy link

bvanseg commented Dec 4, 2024

This is blocking us from upgrading to 0.8.0+. It would be very helpful if there was an action to update just the layout JSON of the model. Without the ability to do so, layout synchronization via websocket across multiple devices becomes a challenge after the changes made in 0.8.0+, as the layout updating on one end triggers the entire model on another end to be recreated.

Alternatively, maybe decoupling the layout from the model altogether would be best? Letting the model become a dispatcher for actions, while the layout itself can be updated freely as a separate prop or by some other means.

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

No branches or pull requests

5 participants