Back to Clerk

`WithClerk` component removed

packages/upgrade/src/versions/core-2/common/withclerk-removed.md

latest445 B
Original Source

The WithClerk higher order component has been removed. If you would still like to use this function in the way its implemented, it can be created quickly using Clerk's custom hooks. An example of how to do so is below:

js
export const WithClerk = ({ children }) => {
  const clerk = useClerk();
  if (typeof children !== 'function') throw new Error();

  return {children(clerk)};
};