Welcome to the React feedback portal. We’re happy you’re here! If you have feedback on how to improve the React, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Your TextAreaComponent, even when used with no child elements, will trigger a react dev warning.
It's easy to demonstrate using your own samples - if you open the first sample from Getting Started in the docs in Stackblitz you'll see a warning on the console:
https://ej2.syncfusion.com/react/documentation/textarea/getting-started
That warning is:
Warning: Use the `defaultValue` or `value` props instead of setting children on <textarea>
The reason for the warning is a bug in this line of code in textarea.component.tsx:
return React.createElement('textarea', this.getDefaultAttributes(),[].concat(this.props.children,this.portals));
If this.props.children is undefined (which it will be if no child elements are placed under TextAreaComponent) then the result of the concat (if this.portals is an empty array) is:
[undefined]
Passing any array, even an empty one, as children into createElement will count as children having been specified (undefined or null needs to be passed instead for it to count as no children having been specified).
So to fix this I think you'd instead need something like these two lines instead (so if there are no children and no portals then undefined will get passed as children to createElement):
const children = [].concat(this.props.children === undefined ? this.props.children : [],this.portals);
return React.createElement('textarea', this.getDefaultAttributes(),children.length ? children : undefined);