Always consider and respect browser native behaviors when implementing web application features. Avoid conflicts with built-in browser shortcuts and choose appropriate client vs server-side approaches based on the execution environment.
Key considerations:
Example from hotkey implementation:
// Avoid: Using 'mod' which maps to 'cmd' on Mac, conflicting with browser tabs
useHotkeys(list.slice(0, 9).map((e, i) => `mod+${i + 1}`), handler);
// Prefer: Use 'ctrl' explicitly to avoid browser shortcut conflicts
useHotkeys(list.slice(0, 9).map((e, i) => `ctrl+${i + 1}`), handler);
Example from navigation:
// Avoid: Server redirect that fails in production
return redirect(urlJoin('/settings', searchParams.tab));
// Prefer: Client-side redirect for better compatibility
// Use client-side navigation instead
This ensures better user experience by respecting established browser conventions and avoiding runtime errors in production environments.
Enter the URL of a public GitHub repository