#Error in typeScript
87 messages · Page 1 of 1 (latest)
remove the crossOrigin prop i guess? the error is saying that it isn't a valid prop.
okay ill try that thanks
is it a typescript thing or would I have this problem if i using JSX instead of TSX?
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
So does the error in typeScript actually casue the versel deployment to fail?
depends on your setup
(hypothetically) maybe crossOrigin is the wrong name, and ts is reporting that; but if you were using js, then you wouldn't be told anything about that, and so you would think you passed that value without it actually doing anything, maybe causing other errors down the line that would be even harder to trace
okay thanks I'm really finding typescript hard to get my head around
ts turns your bugs into errors.
thats so much
even after 1 year of tying i'm still lost
need to eat iceCream to dull the stress
wait, did you mean hard to understand (conceptually) or hard to use?
just everything
what about js/x?
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
thought NextJs would handle pretty much everything TypeScript related
the project wouldn't be much different in plain JS 🤔
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
so it's more JS in general than TS
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
it's a whole different ecosystem than .NET for sure
ts is a safety on top of js, it's not the main thing you're writing.
right, I just make my projects TS to see if i can learn anything
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
nah i need to learn typescript as thats how i get a job
sure, but that doesn't mean you have to learn it now.
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
js is way more important than ts, it's the part that actually does stuff.
they say for small projects typeScript isn't ideal but thats not the what employers have
that's not important
if you don't know js, then you can't know ts.
js forms the foundation for ts
okay I'm tying 1 step at a time I think else I panic
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
nah, tooling isn't a problem with enough experience
Who's completly comfortable with JS though
ts is just a layer on top of js. whatever experience you have in js will carry over to ts.
i mean, considering it's js...
and unlearning that mix of JS+TS will be hard
knowing what part is from vanilla JS and what part isn't
like I can write you a ToDo app in react is that enough JS?
you don't need to be completely comfortable with it though
can you do it confidently?
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?
not sure it's enough to show skills in one "whole" language
there isn't much logic or JS-specific syntax
even on the React part, it's just 2 different components and two useState hooks
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
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
learning where to look for "official" and reliable info is also part of the learning
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
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.
never found out how to get it to work properly
sounds like you're going at a pace that isn't comfortable to yourself
nah I'm going too slow now
just spend some time reading the docs, calmly, and use that in some demo/personnal projects
that's how you build experience over time
definitely try to follow the last point of this. gives you a real reason to learn
I was going fast in bootcamp, and now I'm struggling to do basic css stuff
no such thing, you're just going slower than the course you're in. that's not entirely bad; maybe that course just isn't for you.
from a different perspective, that course is going too fast for you
yes too slow means no job
don't worry about that
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.
thats the goal though right?
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
my senior dev friend told me to go into next.js
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
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
did they explain the reasons why? is it the only framwork they know? how familiar are they with frontend/backend? etc.
naming a technology is one thing
explaning the reasons for that choice is another
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
he just said it does stuff automatically like importing directories
nothing is ever lost
it's probably one of the few jobs where prior experience with one technology can be used to learn new things
if you focus on getting a job, you won't be actually internalizing the knowledge, you'll just be memorizing it
this is a classic story for an unsatisfactory job
take the time to learn. there's nothing that isn't useful, all that you learn will accelerate your future learning.
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?
because it's "magic" and you don't need to understand it to get started
not sure if it's the best way to get started tho
it hides a lot of complexity, but doesn't give you the change to understand what it's doing in the background
and you might not need all of those "magic" aspects anyway