score:1

the error was caused by the shorthand syntax and not due to the component type. the following resolved the error posted above:

return (
    <>
      {!isauthenticating && (
        <div>
          <appcontext.provider
            value={{ isauthenticated, userhasauthenticated }}
          >
            <navbarelement />
            <routes />
            <footerelement />
          </appcontext.provider>
        </div>
      )}
    </>
  );
};

Related Query

More Query from same tag