Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Unwrap React HooksNew to Visual Studio Code? Get it now.
Unwrap React Hooks

Unwrap React Hooks

Ziya Fenn

| (2) | Free
Remove/unwrap React memoization hooks (useCallback and useMemo) from your code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🎯 Unwrap React Hooks

A VS Code extension that removes/unwraps React memoization hooks (useCallback and useMemo) from your code. Perfect for when you're debugging performance issues or simplifying code during refactoring.

✨ Features

  • Instant unwrapping of useCallback and useMemo hooks
  • Smart handling of different function formats (arrow functions, named functions, expressions)
  • Keyboard shortcut for quick access (Ctrl+Shift+U / Cmd+Shift+U)
  • Single-line detection: Just place cursor on single-line hooks
  • Multi-line support: Select the entire hook code to unwrap

🚀 Usage

Keyboard Shortcut

  • Windows/Linux: Ctrl+Shift+U
  • Mac: Cmd+Shift+U

Command Palette

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Type "Unwrap useCallback/useMemo"
  3. Press Enter

🤝 Contributing

Contributions are welcome! Feel free to submit issues and pull requests on GitHub.

📄 License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft