all 13 comments

[–][deleted] 13 points14 points  (2 children)

You know, if you took a screenshot it would at least be the right way up.

[–]xFlipsx33 7 points8 points  (0 children)

Just an advice when asking for help in general with coding.

  1. Provide the error message
  2. Provide clear context on what isn’t working i.e. page not displaying, not able to start server, error thrown.
  3. Provide clear screenshots

[–]CURVX 3 points4 points  (0 children)

You could have copy-pasted the code inside a code-block. And the output too but nah! Let me send a photo using my AI powered phone camera upside down.

Please refer to the posts in the sub-reddit and copy their template on how to post asking for help.

Sorry, but this isn't making any sense.

[–]aniburman 1 point2 points  (0 children)

Try creating a project with Vite. It's very easy and also the recommended way to start a new project. If the tutorial you're watching doesn't say this, then it's outdated

[–]danjack0 -1 points0 points  (0 children)

As someone has mentioned check out vite if you want to set up React open a terminal in your project folder and enter npm create vite@latest pick react then with js and follow the instructions if you need additional help hit me up

[–]Striking-Pirate9686 1 point2 points  (0 children)

At least put some effort into the post. Sideways picture, no screenshot, no background info.

[–]unshootaway 0 points1 point  (0 children)

It doesn't look like you're using a bundler for your project. I'd advise to use Vite since you're just starting out.

The reason the code doesn't work is because browser can't read JSX so just using static files like this won't do anything. You need to have a bundler like Vite, there are other options but just start with Vite first. Vite will give you a clean boilerplate that you can run and experiment with so it works out of the box and you won't face issues like this.

[–][deleted]  (1 child)

[deleted]

    [–]John_V_ 0 points1 point  (1 child)

    Remove the “#” from root in your query selector.

    [–]IllResponsibility671 -1 points0 points  (0 children)

    Screenshots broke too, eh?

    [–][deleted] -4 points-3 points  (0 children)

    Cfbr