Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Instruction

The React Challenge: Solution

Create and use the Icon component

First, create a new file named Icon.js containing a functional component named Icon. This component renders the SVG element:

// Icon.js
import React from 'react';

const Icon = (props) => {
  <svg>...</svg>
};

export default Icon;

In the file Player.js, import the Icon component:

import Icon from './Icon';  
```...