#Hello, I wrote basic react app and used vite.

38 messages · Page 1 of 1 (latest)

sage urchin
#

@past steeple how are you trying to run the app?

past steeple
#

npm run dev

#

I reaiiy dont get it, why just a white screen shown,

#

I sent scss

#

and its modular and simple

sage urchin
#

2 secs, let me get to my pc

past steeple
#

alright, I shared repo, pls check or clone maybe

sage urchin
#

Are you getting any errors in the browser console?

past steeple
#

nope,

#

no action in console or netwrok

#

just [vite] connected...

sage urchin
#

Not the console in VSCode, the web browser console

past steeple
#

yes, I understood

#

no action on the browser

sage urchin
#

ok

#

2 secs

#

Ok, first problem. In your Directory component you aren't returning anything. Your component won't render anything without a return statement.

#

Same with your MenuItem component

past steeple
#

hmm, I changed ```import "./menu-item.styles.scss";

const MenuItem = ({ menu }) => {
const { imageUrl, title, price } = menu;
render(
<div className="menu-container">
<div
className="background-img"
style={{ backgroundImage: url(${imageUrl}) }}
/>
<div className="menu-body-container">
<h2>{title}</h2>
<p>{price}</p>
</div>
</div>
);
};

export default MenuItem;

#
import "./directory.styles.scss";

const Directory = ({ menus }) => {
  return (
    <div className="menu-container">
      {menus.map((menu) => (
        <MenuItem key={menu.id} menu={menu} />
      ))}
    </div>
  );
};

export default Directory;
#

but

sage urchin
#

So, read what the error says. menu-item.component.js file, line 5 - render is not defined

past steeple
#

ah, thank you

#

now scss is broken

#

scss is wrong?

sage urchin
#

Let me check

#

Seems to be working fine for me

past steeple
#

not working for me🤔

sage urchin
#

What are you expecting to see there?

past steeple
#

like that

sage urchin
past steeple
#

hmm

#

same scss

#

just img links are diff

sage urchin
#

Well, the files are all working and the scss is being compiled properly. If the style isn't what you want then that's a different issue

past steeple
#

hm

#

scss is same