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

forceUpdate not work in child component GuardGraph #31019

Open
wowok-ai opened this issue Sep 22, 2024 · 0 comments
Open

forceUpdate not work in child component GuardGraph #31019

wowok-ai opened this issue Sep 22, 2024 · 0 comments
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@wowok-ai
Copy link

wowok-ai commented Sep 22, 2024

export default function GuardSetting (props:any) {
  const [, forceUpdate] = useReducer(x => x + 1, 0);

    return (
      <Paper sx={{ width: '100%', pt:'1em', }} >
        <SettingHeader name={'Launch Guard'}/>
        <ReactFlowProvider>
          <GuardGraph {...props} forceUpdate={forceUpdate}/>
        </ReactFlowProvider>
      </Paper>
    );
}

Is there any more elegant way to refresh GuardGraph without using window.location.reload()?
Thx.

@wowok-ai wowok-ai added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

1 participant