css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv
CodePen probably won't work great in this browser. We generally only support the major desktop browsers like Chrome, Firefox, Safari, and Edge. Use this one at your own risk! If you're looking to test things, try looking at Pens/Projects in Debug View.
user profile image

This Pen is a fork of Dan Abramov's Pen GjyNLa.

Comments

  1. Hi, I'm following this pen in order to learn React (obviously) but I don't understand why in ProductRow component the style is written within double curly braces . Hope you can help me, thaks in advance!

  2. Hi David! It is because in JSX CSS is denoted as Javascript Objects Literals, that is {color: 'red', border: '1px'}, and in JSX element or component attributes are passed in one pair of curly braces if they are JavaScript expressions. So what happens in ProductRow component you mentioned is passing an object as attribute to style attribute of span element. This is different notation than passing inline css to html elements.

Leave a Comment Markdown supported. Click @usernames to add to comment.

You must be logged in to comment.
Loading...
Loading...