Share Styles Across Multiple Components (6/6)


In the 6th instruction; I’ve allways this same error:
Oops! The test returned an error. Maybe you have a syntax error, or a typo. See full error.

import React from 'react';
import ReactDOM from 'react-dom';
import { AttentionGrabber } from './AttentionGrabber';
import { styles } from './styles';

const divStyle = {
  background: styles.background,
  height: '100%'

export class Home extends React.Component {
  render() {
    return (
      <div style={divStyle}>
        <AttentionGrabber />
        <footer>THANK YOU FOR VISITING MY HOMEPAGE!</footer>

	<Home />, 



Maybe instead of you using a comma-, in

you should use a semi-colon-;
background: styles.background;


Not because ‘divStyle’ is an object!


I had the same issue, I have no idea what’s wrong here


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.