Closed schlaup closed 7 years ago
Using React 16 (maybe with React 15 as well - I did not try) I get the following warning in the debug console:
Warning: Failed prop type: Invalid prop 'x' of type 'number' supplied to 'Text', expected 'string'.
In the code I can see that you declare the properties' types correctly:
Text.propTypes = { x: PropTypes.string,
but you pass the values as is without converting them to strings:
return <text { ...prepare(rest) } { ...{ x, y, dx, dy, rotate } } />;
Shouldn't this be something like:
return <text { ...prepare(rest) } { ...{ x !== undefined ? x.toString() : x, [etc.] } } />;
Thanks for the module! Nice work!
Fixed in 3.0.1 -- Thanks for taking the time to report this issue.
Using React 16 (maybe with React 15 as well - I did not try) I get the following warning in the debug console:
Warning: Failed prop type: Invalid prop 'x' of type 'number' supplied to 'Text', expected 'string'.
In the code I can see that you declare the properties' types correctly:
but you pass the values as is without converting them to strings:
Shouldn't this be something like:
Thanks for the module! Nice work!