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

[REACT] propertyConfigNames should be processed by the wrapper #10514

Open
jsakalos opened this issue Dec 18, 2024 · 1 comment
Open

[REACT] propertyConfigNames should be processed by the wrapper #10514

jsakalos opened this issue Dec 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working forum Issues from forum high-priority Urgent to have fixed info requested Further information is requested react React framework integration wrappers Framework wrappers integration

Comments

@jsakalos
Copy link

Forum post

I think we should also process propertyConfigNames in addition to propertyNames. The only difference between the two is that properties are not set during config time and propConfigs can be set both at config and run time.

The code should then read:

function shouldComponentUpdate(component: any, nextProps: Readonly, nextState: Readonly): boolean {
const { props, instance, propertyNames, propertyConfigNames } = component;

propertyNames.concat(propertyConfigNames).forEach((prop: string) => {
    if (props[prop] !== nextProps[prop]) {
        // Check if property is not a config
        applyPropValue(instance, prop, nextProps[prop], false);
    }
});

// Reflect JSX cell changes
return nextState?.generation !== component.state?.generation;

}
(untested)

I'll try the above and if our tests pass it'll be released in the next version.

@jsakalos jsakalos added bug Something isn't working react React framework integration high-priority Urgent to have fixed forum Issues from forum wrappers Framework wrappers integration labels Dec 18, 2024
@jsakalos jsakalos self-assigned this Dec 18, 2024
@jsakalos
Copy link
Author

@jsakalos jsakalos added the info requested Further information is requested label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum high-priority Urgent to have fixed info requested Further information is requested react React framework integration wrappers Framework wrappers integration
Projects
None yet
Development

No branches or pull requests

1 participant