-
Notifications
You must be signed in to change notification settings - Fork 298
Closed
Description
It looks like the create-element-to-jsx transform silently throws away comments within React.createElement calls. Ideally, it should find some way to preserve the comments, or maybe give an error so I can fix those files manually, but if that's too hard or out of scope, I think the behavior should at least be documented.
For example, if you run it on this file:
import React from 'react';
const render = () => {
return React.createElement('div', {
className: 'foo', // This is an important comment.
});
};It produces this:
import React from 'react';
const render = () => {
return <div className="foo" />;
};Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels