MarkBoots
KPCKevin Powell - Community
•Created by Faker on 11/17/2024 in #front-end
How to use Fetch API in JS
it's not 'just' a variable. it's an object. template literals only work with strings
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
25 replies
KPCKevin Powell - Community
•Created by Faker on 11/17/2024 in #front-end
How to use Fetch API in JS
with that you're trying put an object into a string. you can just console log the object itself
25 replies
KPCKevin Powell - Community
•Created by Faker on 11/17/2024 in #front-end
How to use Fetch API in JS
well, you're making the result a string with the
${result}
console.log("Success": result)
will work25 replies
KPCKevin Powell - Community
•Created by Faker on 11/17/2024 in #front-end
How to use Fetch API in JS
a really simple example
there are some other things to take care of though. What if the api is not responding or returns something you didnt expect. you have to do some extra work for that
25 replies
KPCKevin Powell - Community
•Created by vic on 11/15/2024 in #front-end
how to calculate border values based on height and width in css for loaders
other option could be to use container units in a pseudo element
4 replies
KPCKevin Powell - Community
•Created by vic on 11/15/2024 in #front-end
how to calculate border values based on height and width in css for loaders
if you want the border size to be a percentage of the element size, you could mimic the border with a background. that accepts percentages.
something like this
4 replies
KPCKevin Powell - Community
•Created by peterpumkineaterr on 11/10/2024 in #front-end
side index is not sticking. what i'm doin’ wrong ?
you are missing the position where it sticks to. add
top: 0
to .side6 replies
KPCKevin Powell - Community
•Created by Raskin on 11/8/2024 in #front-end
skip eggs function
no problem, glad to help
27 replies
KPCKevin Powell - Community
•Created by Raskin on 11/8/2024 in #front-end
skip eggs function
because it seems OP is still learning, don't overcomplicate it
27 replies
KPCKevin Powell - Community
•Created by Raskin on 11/8/2024 in #front-end
skip eggs function
but the question was if his logic was correct. there are multiple other methods and logic, but i kept it with the explanation of op's examples
27 replies
KPCKevin Powell - Community
•Created by Raskin on 11/8/2024 in #front-end
skip eggs function
then the resulting array is in the wrong order
unless instead of push, you add it with unshift
27 replies
KPCKevin Powell - Community
•Created by Raskin on 11/8/2024 in #front-end
skip eggs function
the example of the youtube vid combines the egg value + counter check.
- if it is an egg AND (&&) the counter is less then 2, increase counter and 'continue' (skip the following bit, go to next iteration)
- if not, add it to the array (else is not needed, because it won't reach this bit because of the continue)
27 replies
KPCKevin Powell - Community
•Created by Raskin on 11/8/2024 in #front-end
skip eggs function
yea, your logic seems to be correct.
reverse the array and iterate trough it
- if the value is egg, check if you already have 2.
* if not: increase the counter and continue
* if so, push it to the new array
- if the value is not egg, push it to the new array
reverse the array back.
27 replies
KPCKevin Powell - Community
•Created by lko on 11/2/2024 in #front-end
Is it normal for view transitions to still be buggy?
maybe you can screenrecord to show us what happens
3 replies
KPCKevin Powell - Community
•Created by lko on 11/2/2024 in #front-end
Is it normal for view transitions to still be buggy?
i ran it locally but it works just fine. Can't tell if it has something to do with linux, but if you use the same browser, I can't see a reason why it acts differently
3 replies
KPCKevin Powell - Community
•Created by vic on 11/2/2024 in #front-end
how to make border bottom color transition
Im no expert in react and mui, but after a bit of searching:
the default input already has the animating underline. To change its colors:
you coul;d also define themes, but that's totally out of my knowledge
8 replies
KPCKevin Powell - Community
•Created by Faker on 11/2/2024 in #front-end
Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true. . .
grammerly is an extenstion I suppose, yes
25 replies
KPCKevin Powell - Community
•Created by Faker on 11/2/2024 in #front-end
Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true. . .
then it wouldnt find the element to attach the eventlistener too, but that doesnt seem to be the issue
25 replies
KPCKevin Powell - Community
•Created by Faker on 11/2/2024 in #front-end
Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true. . .
can you screenshot the error from the devtools console
25 replies
KPCKevin Powell - Community
•Created by Faker on 11/2/2024 in #front-end
Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true. . .
25 replies