I would like to have prettier removes the unnecessary return
statement.
For the next code example:
const Component = ({ children }) => {
return (
<div>
{children}
</div>
);
};
I would like prettier removes the return
statement, and turn it into:
const Component = ({ children }) => <div>{children}</div>;
Is it possible?
Olá Tente desta forma por favor. Pois acredito que não sejam necessárias as chaves {} dentro dos parenteses () e nem o return.
const Component = (children) => ( {children} )
};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.