Add {...} to arrow function

Convert arrow function expression body into a block body.

Refactoring (Convert)
ES2015
P42 for VS Code
Add {...} to arrow function

Why is this refactoring helpful?

When you want to add statements to an arrow function with an expression body, you need to convert it to a block body first. This code action lets you do this quickly.

Related Code Actions

Learn More

Available In