mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Add example for how to use style properly
Test Plan: jest
This commit is contained in:
@@ -69,7 +69,8 @@ function assertValidProps(props) {
|
||||
invariant(
|
||||
props.style == null || typeof props.style === 'object',
|
||||
'The `style` prop expects a mapping from style properties to values, ' +
|
||||
'not a string.'
|
||||
'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' +
|
||||
'using JSX.'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user