When prop needs to be of object/array type, it needs to be operated through JS. However, the rendering of custom-element in React Hook does not seem to be consistent with the execution logic of useEffect after component rendering. The phenomenon is that the effect function is executed earlier than the custom-element, causing the setting prop to not work correctly
@karol-f
When prop needs to be of object/array type, it needs to be operated through JS. However, the rendering of custom-element in React Hook does not seem to be consistent with the execution logic of useEffect after component rendering. The phenomenon is that the effect function is executed earlier than the custom-element, causing the setting prop to not work correctly
CodeSendbox demo
Local:![image](https://user-images.githubusercontent.com/4555635/115989760-819ab300-a5f2-11eb-9e26-d5bb826a3e15.png)
Expected![image](https://user-images.githubusercontent.com/4555635/115989786-a2fb9f00-a5f2-11eb-9483-226e2970a818.png)