#react

1 messages · Page 1 of 1 (latest)

coarse wigeon
#

well

#

u create a react component inside a .jsx or .tsx file

modern kindle
#

joined

coarse wigeon
#

usually we create threads when the convo gets long

modern kindle
#

smart

coarse wigeon
#

anyways, dw much on how things work behind the scenes for now

#

just build and you'll eventually understand things

#

to create a react components there are some rules u should follow

#

u speeding things up a bit so that's why u won't understand everything

#

but it's fine ur goal is to build ur personal website

#

not for working

modern kindle
#

indeed

#

i dont get how i have 2 of all my files

#

i swear i followed the guide but i have the .js and .tsx

coarse wigeon
#

look show me the page.js

modern kindle
#

2nd one is .tsx

#

lol thats my site if ya wanna check it out

#

dunno if i just doxxed myself or something

coarse wigeon
#

nah

#

u didn't lol

#

anyways so the page.js was probably an option to add

#

maybe he was saying u can add this or .tsx

#

doesn't matter

#

pick whatever

#

but u don't know typescript so

modern kindle
#

correct, all the examples on next.js are in typescript tho

#

i assume it is not the same as javascript?

coarse wigeon
#

it's a superset of javascript

#

like JavaScript

#

but with extra things

#

in the nextjs docs u can switch to js and check stuff tho

modern kindle
#

so do the .js files stay or get renamed .jsx

coarse wigeon
#

but look if u just wanna build sth simple, u don't really have to learn everything

#

just hire someone ig

#

or use a template

coarse wigeon
modern kindle
#

i mean the site is to learn to code, not made out of necessity. sometimes when i ask chatgpt questions about my html and i do all of its suggestions it just recommends using something like react

#

and then react recommends using a framework

#

after i learn react

coarse wigeon
#

oh u wanna learn how to code?

#

then start slow

#

learn react first

#

then move to nextjs

modern kindle
#

another problem i had was i don't understand how to add react to an existing html project

#

i gotta figure out how to get to my 1 folder but i can show you my code if that'll help

#

im more confident with that stuf

#

like where would i even begin

#

test and testes are basically nonexistent

coarse wigeon
#

u can't add react to an existing html project

#

no no no

#

u create a react project

#

an empty one

#

and start building similarly

modern kindle
#

would you be willing to walk me through the process of creating a react project real quick then? you saw how bad my file structure was last night

#

didn't even know i could make a 2 smh

coarse wigeon
#

sure

#

create a new folder

#

empty one

#

then run

modern kindle
#

at the same level as like 1 and 2

#

?

coarse wigeon
#

yep

modern kindle
#

run what

#

i have the new folder open in vs code

coarse wigeon
#

npm create vite@latest .

modern kindle
#

react is the framework right

#

not vanilla?

#

i hit react

#

should i do javascript or jacvascript +swc

coarse wigeon
#

js

coarse wigeon
#

means no framework

modern kindle
#

so react is a framework of js, and next.js is a framework of react?

coarse wigeon
#

react is a library

#

it can be considered a framework

#

but it not really is

#

Nextjs is built on top of react

modern kindle
#

so like when i run it in localhost it has a vite + react page made up

#

what all do i delete to have a blank slate but it still work

coarse wigeon
#

yes

#

just delete what's inside the div

#

and now learn react normally

#

search on YouTube react course

#

not tutorial

#

also some ppl might use create-react-app to install react

#

I don't recommend it

#

it's really slow

#

and bad

modern kindle
#

i see

#

are there any generally recommended youtubers? i don't wanna get the jake paul of coding

coarse wigeon
#

hmm

#

lemme check someone I know

#

well a react course should be no less than 4 hours tbh

#

u can't really be react dev in 1 hour or 30 min

modern kindle
#

thats fine

#

i have all my life

#

that's why i've been going by the developers guides instead of youtube

coarse wigeon
#

good luck man

modern kindle
#

thank you, i appreciate all the help