const user = { name : 'Hedy Lamarr' , imageUrl : 'https://i.imgur.com/yXOvdOSs.jpg' , imageSize : 90 , } ;
export default function Profile ( ) { return ( < > < h1 > { user . name } </ h1 > < img className = "avatar" src = { user . imageUrl } alt = { 'Photo of ' + user . name } style = { { width : user . imageSize , height : user . imageSize } } /> </ > ) ; }
Show more
In the above example, style={{}} is not a special syntax, but a regular {} object inside the style={ } JSX curly braces. You can use the style attribute when your styles depend on JavaScript variables.
| status | not read | reprioritisations | ||
|---|---|---|---|---|
| last reprioritisation on | suggested re-reading day | |||
| started reading on | finished reading on |