Open mahmoud-alawad opened 1 day ago
@mahmoud-alawad Nice catch, and many thanks for reporting this!
It would be great if you could create a pull request (PR) with a suggestion on how this issue can be resolved. Would that be an option for you?
@timohubois May have a look on this pr https://github.com/flyntwp/flynt/pull/580
Describe the bug Nested components unexpectedly have access to the parent component's context data, even when no parameters or props are explicitly passed to them. This causes unexpected behavior and potential data leakage, leading to unintended side effects in the application.
To Reproduce Steps to reproduce the behavior:
Expected behavior The nested component should not have access to the parent context data unless explicitly passed via props or another intentional mechanism.
Screenshots
To prevent the issue in the example, the element property must be explicitly passed across all project files, ensuring consistent behavior and avoiding unintended context sharing. as down here
The context must be reset at the root level each time the component is rendered to ensure a clean state and prevent unintended data persistence across renders.