When the user is authenticated and withWebId is used on a component, the component is first rendered with withWebId set to undefined and then the prop is changed to the correct user WebId.
The preferred behavior would be to pass the user's webId on the first render.
A very simplified example:
export default MyComponent = withWebId(({webId}) => (
webId ? <LoggedInComponent/> : <LoggedOutComponent/>
);
On each mount with an authenticated user the LoggedOutComponent is rendered first and then it is replaced by the LoggedInComponent. I would expect only the LoggedInComponent to be rendered.
I'm pretty new to Solid and solid-react-components, so I'm sorry if there is something I misunderstood or used differently that it was designed to work.
When the user is authenticated and withWebId is used on a component, the component is first rendered with
withWebIdset toundefinedand then the prop is changed to the correct user WebId.The preferred behavior would be to pass the user's webId on the first render.
A very simplified example:
On each mount with an authenticated user the
LoggedOutComponentis rendered first and then it is replaced by theLoggedInComponent. I would expect only theLoggedInComponentto be rendered.I'm pretty new to Solid and solid-react-components, so I'm sorry if there is something I misunderstood or used differently that it was designed to work.