Build a Reusable Profile Card Component - Step 4

Tell us what’s happening:

hi Im stuck trying to return an empty string. Please help

Your code so far

<!-- file: index.html -->
<!doctype html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Reusable Card component</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.3.1/umd/react.development.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.3.1/umd/react-dom.development.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/7.26.3/babel.min.js"></script>
    <script
      data-plugins="transform-modules-umd"
      type="text/babel"
      src="index.jsx"
    ></script>
     <link rel="stylesheet" href="./styles.css" />
  </head>
  <body>
    <div id="root"></div>
    <script
      data-plugins="transform-modules-umd"
      type="text/babel"
      data-presets="react"
      data-type="module"
    >
      import { App } from './index.jsx';
      ReactDOM.createRoot(document.getElementById('root')).render(
        <App />
      );
    </script>
  </body>
</html>
/* file: styles.css */
:root {
  --dark-grey: #1b1b32;
  --light-grey: #f5f6f7;
  --dark-orange: #f89808;
}

body {
  background-color: var(--dark-grey);
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
}

.card {
  border: 5px solid var(--dark-orange);
  border-radius: 10px;
  width: 100%;
  padding: 20px;
  margin: 10px 0;
  background-color: var(--light-grey);
}

.card-title {
  border-bottom: 4px solid var(--dark-orange);
  width: fit-content;
}

@media (min-width: 768px) {
  .card {
    width: 300px;
  }
}
/* file: index.jsx */
export function Card({ name, title, bio }) {
  return (
    <div className="card">
      <h2>{name}</h2>
      <p className="card-title">{title}</p>
      <p>{bio}</p>
    </div>
  )
}


{/* User Editable Region */}

export function App() {
  return (
     ("  "), ("  ")
  );
}

{/* User Editable Region */}

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36

Challenge Information:

Build a Reusable Profile Card Component - Step 4

Where are you returning an empty string? An empty string should have nothing inside of it.

hi Im stuck with return a pair of parentheses containing an empty string. can I please get a hint?

I just gave you a hint.

Where are you returning an empty string? Please quote which line you believe contains a single empty string.

Please note:

""  //empty string
" "  //string with a space character
"  "   //string with 2 spaces
 
1 Like
export function App() {
  return (
    <div> 
     */ I think I'm putting here*/ <p>{("  ")}</p>
     </div>
  );

This is not an empty string. That string has a space inside of it.

Now you’ve added a div and p element, which also are not an empty string.

I was having the same problem.
return(“”);

the problem wasn’t in the string itself but in the ; i removed it and it passed.
return(“”)

That’s not the same problem - you have an empty sting