#Error in typeScript

87 messages · Page 1 of 1 (latest)

minor loom
#

Can someone explain how i fix this error please

exotic hinge
#

remove the crossOrigin prop i guess? the error is saying that it isn't a valid prop.

minor loom
#

okay ill try that thanks

#

is it a typescript thing or would I have this problem if i using JSX instead of TSX?

exotic hinge
#

this is a typescript error, so it's not going to come up if you just use javascript.
it's there for a reason though; it's more checking, not just more errors

#

if you were to just use js, the errors ts used to report would instead be bugs, much harder to track

minor loom
#

So does the error in typeScript actually casue the versel deployment to fail?

exotic hinge
#

depends on your setup

exotic hinge
minor loom
#

okay thanks I'm really finding typescript hard to get my head around

exotic hinge
#

ts turns your bugs into errors.

minor loom
#

thats so much

#

even after 1 year of tying i'm still lost

#

need to eat iceCream to dull the stress

exotic hinge
#

wait, did you mean hard to understand (conceptually) or hard to use?

minor loom
#

just everything

exotic hinge
#

what about js/x?

minor loom
#

like i got css and battled my way through js then react.... omg and node and then typescript .. and thats like not enough for anything

tawny granite
#

thought NextJs would handle pretty much everything TypeScript related
the project wouldn't be much different in plain JS 🤔

minor loom
#

i need c sharp and c and .net

#

...

#

too much

exotic hinge
#

tsx is a combination of js, the stuff ts puts on top of it, and the stuff jsx puts on top of that
learning a lot of things at once is going to be harder than learning stuff sequentially

tawny granite
exotic hinge
#

so if you're not already comfortable with js/jsx, it might be better to leave ts for the time being and just get familiar with js

tawny granite
#

it's a whole different ecosystem than .NET for sure

exotic hinge
#

ts is a safety on top of js, it's not the main thing you're writing.

minor loom
#

right, I just make my projects TS to see if i can learn anything

exotic hinge
#

if it's stopping you from practicing js effectively, then leave it and come back to it later

#

if it's overwhelming you, then slow down and take one thing at a time

minor loom
#

nah i need to learn typescript as thats how i get a job

exotic hinge
#

sure, but that doesn't mean you have to learn it now.

tawny granite
#

yeah, the TS handbooks says it's fine learning TS with no prior experience in programming
but wouldn't recommend it
since they kinda expect you to know the JS ecosystem

exotic hinge
#

js is way more important than ts, it's the part that actually does stuff.

minor loom
#

they say for small projects typeScript isn't ideal but thats not the what employers have

exotic hinge
#

that's not important

#

if you don't know js, then you can't know ts.

#

js forms the foundation for ts

minor loom
#

okay I'm tying 1 step at a time I think else I panic

exotic hinge
#

if you're not comfortable with js, and learning ts becomes a brick wall, then just don't learn both at the same time.
just go with js until you're comfortable with that

tawny granite
minor loom
#

Who's completly comfortable with JS though

exotic hinge
#

ts is just a layer on top of js. whatever experience you have in js will carry over to ts.

exotic hinge
tawny granite
minor loom
#

like I can write you a ToDo app in react is that enough JS?

exotic hinge
#

you don't need to be completely comfortable with it though

exotic hinge
#

if errors show up, can you solve them?
if i ask for some extra feature, how comfortable are you with adding that to what you have?

minor loom
#

no I need chatGPT to help and maybe look up some notes

#

i can't ....

tawny granite
exotic hinge
# minor loom no I need chatGPT to help and maybe look up some notes

if that's "comfortable" enough for you, then sure; i can't decide that for you
but IMO, i think that's a sign that you haven't practiced enough.
using external resources isn't bad, but if you're confident that you need to use external resources, it's a sign that the knowledge isn't internal to you yet

tawny granite
#

ToDo app might be great to see how languages / frameworks compare
but would say it's not that great to show experience using some tech stack

tawny granite
minor loom
#

like ToDo app makes me sweat so hard

#

it depends if you want a basic one or node.js with persisting and data with data basis

exotic hinge
#

this.. isn't a super great recommendation, but it's the only concrete recommendation i have; practice smaller tasks on coding sites (like codingame, hackerrank, leetcode, etc) to build confidence and familiarity with the language.

having to google stuff isn't bad, but over time, try to internalize the results. learn how to parse and solve errors, that kind of thing

also, finding some project to do which is something you actually want to do will help. no time constraints, no deadlines, and the only reason to do it is because you want to; that, i find, is the best way to practice making stuff. this isn't limited to coding.

minor loom
#

omg the pain and stress makes me feel a bit sick

#

mongo bd i hate you

exotic hinge
#

damn that's.. a lot to be learning at once, yeah

#

yikes

minor loom
#

never found out how to get it to work properly

exotic hinge
#

sounds like you're going at a pace that isn't comfortable to yourself

minor loom
#

nah I'm going too slow now

tawny granite
#

just spend some time reading the docs, calmly, and use that in some demo/personnal projects
that's how you build experience over time

exotic hinge
minor loom
#

I was going fast in bootcamp, and now I'm struggling to do basic css stuff

exotic hinge
#

from a different perspective, that course is going too fast for you

minor loom
#

yes too slow means no job

exotic hinge
#

don't worry about that

tawny granite
#

feel like NextJs is not a good framwork to get started with
possible the worse one
because you both need to write frontend + backend code
some of tose parts are mixed or co-located

  • you have to learn TS
  • you have to learn React
  • NextJs specific features
    etc.
minor loom
#

thats the goal though right?

exotic hinge
#

your target should be to learn, with the end goal being a job or whatever; don't use getting a job as the immediate target

#

use getting a job as motivation for why you want to learn, but don't let that impede what you're actually learning

minor loom
exotic hinge
#

they're senior. they see the light at the end of the tunnel. not everyone remembers the journey through the tunnel.

a dimmer light with a shorter tunnel might be better for learning, just not a job

ultimately, learning is the important part, because what you've already learned makes you learn faster

minor loom
#

I need to focus on getting a job else ill go down a rabit hole of learning something that's not useful and wont be able to come back

tawny granite
#

but tbh, it's like most things, it takes time to build up epxerience
you can't expect to pain the Mona Lisa with only 1 month of practice and no prior experience in art

minor loom
#

he just said it does stuff automatically like importing directories

tawny granite
exotic hinge
#

internalizing the knowledge and being able to extend the knowledge is more important, no? than if you were to just know a certain level and not be able to extend anywhere past that

#

also; if you're not getting any enjoyment from programming, why pursue it?

tawny granite