You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Description:
When passing a prop to a component via the <Element /> component (e.g., <Element is={component} someProp={prop} />), the component initially renders with the correct prop value. However, subsequent updates to the prop in the parent component are not reflected in the child component.
Steps to Reproduce:
Pass a prop to a component using the wrapper.
Update the prop's value in the parent component.
Observe that the child component does not re-render with the updated prop value.
Expected Behavior:
The child component should update when the prop value changes in the parent component.
Is this behavior intentional by design?
Hi, once you set something inside a element , It is the only source of truth. You cannot change the props as you would with react or use state. To do that, you need to use setProp method of craft js.
Bug Description:
When passing a prop to a component via the
<Element />
component (e.g.,<Element is={component} someProp={prop} />
), the component initially renders with the correct prop value. However, subsequent updates to the prop in the parent component are not reflected in the child component.Steps to Reproduce:
Pass a prop to a component using the wrapper.
Update the prop's value in the parent component.
Observe that the child component does not re-render with the updated prop value.
Expected Behavior:
The child component should update when the prop value changes in the parent component.
Is this behavior intentional by design?
Code Example:
A reproduction of this issue can be found in this StackBlitz project: https://stackblitz.com/edit/stackblitz-starters-fzasbl?file=app%2Fpage.tsx
The text was updated successfully, but these errors were encountered: