Skip to content

ziyafenn/unwrap-react-hooks

Repository files navigation

🎯 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

About

VS Code extension to remove/unwrap React memoization hooks (useCallback and useMemo)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published