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
while using the universal component if a developer pass an error props for its own handling of error in the component, then what happens is that in the npm itself we are using the error props and based on that props we are returning the error component.
error and isLoading is very common name we should rename those two props.
Yes we can rename the props but consider a scenario of a large project where they implement chunk loading approach in a later phase of a project and also each and every dev needs to be aware of this that we cant use this two props and when a new dev comes then also he need to keep this thing in mind.
It would be good if we can rename this two props to something like universalChunkError or something else which clearly identifies that this prop is being used in the module itself.
while using the universal component if a developer pass an error props for its own handling of error in the component, then what happens is that in the npm itself we are using the error props and based on that props we are returning the error component.
error and isLoading is very common name we should rename those two props.
for e.g
import ShowData from '../ShowData/ShowData.async'
const MyComponent = ({error,data})=>{
return < ShowData error={error} data={data} />
}
const ShowData = universal(
import('./ShowData'),
);
export default ShowData;
The text was updated successfully, but these errors were encountered: