UNPKG

react-bottom-fixed

Version:

A React component for iOS that keeps your bottom-positioned elements fixed and safely visible, automatically adjusting their positions when viewport changes (e.g., virtual keyboard appearance).

11 lines (10 loc) 373 B
/** * Check if the code is running on the server * @returns true if the code is running on the server, false otherwise */ export const isServer = () => typeof window === 'undefined'; /** * Check if the code is running on the client * @returns true if the code is running on the client, false otherwise */ export const isBrowser = () => typeof window !== 'undefined';