UNPKG

@itwin/itwinui-react

Version:

A react component library for iTwinUI

16 lines (15 loc) 659 B
/** * Returns a function that can be used to log one-time warnings in dev environments. * * **Note**: The actual log call should be wrapped in a check against `process.env.NODE_ENV === 'development'` * to ensure that it is removed from the production build output (by SWC). * Read more about the [`NODE_ENV` convention](https://nodejs.org/en/learn/getting-started/nodejs-the-difference-between-development-and-production). * * @example * const logWarning = useWarningLogger(); * * if (process.env.NODE_ENV === 'development') { * logWarning("please don't use this") * } */ export declare const useWarningLogger: () => (message: string) => void;