Design comparison
Solution retrospective
Hello everyone...
Does anyone know how to configure webpack or add a JavaScript polyfil plugin so I can implement latest features JavaScript has to offer.
I came across this when I tried to add a timeout to fetch
and the solution I found was to add AbortSignal.timeout()
to fetch
options but this is only supported in latest browser versions. You can check an article from MDN Abort Signal.
Thanks in advance.
Community feedback
- @elaineleungPosted over 2 years ago
Hi MD5, have you tried using
AbortController
instead? I think a timeout can be set; I've seen a Log Rocket article on comparing fetch with axios, and it seemed like a possible option.Also, for the width of the advice box, I tried resizing the browser to a smaller width and noticed that the component wasn't too responsive. I couldn't quite figure out what was going on, but I did wonder whether it's due to the absolute positioning, so I tried removing all the properties for absolute position and then added flexbox for centering with a responsive width, like this:
main { display: flex; align-items: center; min-height: 100vh; }
I only chose
main
since that seems to be the child node of the root div, but I'd suggest creating a parent container div for main and setting these rules there instead. Anyway, this seems to help with centering and with keeping the component responsive, so you can see whether you'd want to try this out too.Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord