I'm having trouble deploying my project to GitHub pages. My project shows up just fine on Netlify but on my GitHub pages site for this project, a blank page is shown to me with this error logged into the console: Loading module from “https://wdwaleed.github.io/Advice-Generator-App-Frontend-Mentor/src/main.jsx” was blocked because of a disallowed MIME type (“text/jsx”)
Arber Lisaj
@arberlisajAll comments
- @WDWaleedSubmitted about 1 year ago@arberlisajPosted about 1 year ago
Hi there
- I had the same problem when first started learning react, this problem is caused because of vite bundler. I have a github repo on how to solve this it will only take you a couple of minutes repo link
Marked as helpful1 - @MansabHashimSubmitted over 1 year ago
- @cheribellaSubmitted over 1 year ago
Things I find difficult in this challenge
- The entire JavaScript
But I managed with hours of research and stuff.
@arberlisajPosted over 1 year agoHi @oyasumibella 👋 First I would like to congatulate you on compleaging the Tip Calculator App🧮 and "The entire JavaScript" you said that had me burst out laughing 😂anyways would like to share with you a couple suggestions to improve your solution
- JavaScript: Never name your variables like this
$resetBtn
it should be a cleaner and more readable likeresetButtonEl
or justresetBtnEl
- JavaScript: Instead of using const like a million times you want to declare your variables like this
const firstName = 'Jane' , lastName = 'Doe' , age: 120;
- UX: If you will work on responsiveness again please make it so it is more repsonsive to smaller screens so i test my websites on an iphone 8 around
370px
wide and this solution it is not as good of a UX as on a larger screen like my laptop - GitHub: You want to remove the unused files and directories from your github repo like : designes , README-template.md etc
All in all Great solution 🎉 and i wish you a long time in the community😊
Happy Coding :)
Marked as helpful1 - @mecha-mannSubmitted over 1 year ago
Do you have any questions about best practices with writing CSS?
- @hillarionCodesSubmitted over 1 year ago
the challenge is much more easier than i thought, i was able to see through the designer's layout and the approach to it.
so i made use of flexbox and css3 in building this and it took me 3hrs to solve.
@arberlisajPosted over 1 year agoHi @hillarionCodes I would like to congratulate you on completing the Results summary component and I might have a couple suggestions regarding your solution
- A semantic element clearly describes its meaning to both the browser and the developer
so instead of spamming a bunch of
divs
it would be a lot better to use semantic elements like for example<div class="container">
should be replaced with<section class="container">
or even<main class="container">
and instead of<div class="result">
you want to use<section class="result">
- In the right container where the results are displayed you want to add some padding so the button doesn't touch the border it would be a lot more aesthetic from a designers eye
All in all good solution and i wish you a long time in the community
Happy Coding :)
Marked as helpful0 - A semantic element clearly describes its meaning to both the browser and the developer
so instead of spamming a bunch of
- @dfeeney96Submitted over 1 year ago
I would like to know if there are any parts of my code (particularly the JS) that I could improve on. Are there any best practices I have missed or ways to make my code more readable / efficient?
Thank you!
@arberlisajPosted over 1 year agoHi @danielle I would like to congratulate you on completing the Age Calculator App and I might have a couple quick solutions for your questions
- Instead of declaring constant variables like this:
const dayLabel = day;
const monthLabel = month;
etc. You want to declare them like thisconst dayLabel = day , monthLabel = month , yearLabel = year;
- I see you use function keyword inside methods for an instance
forEach(function(monthOfYear)
it would've been a lot better if you used arrow like thismonthsOfYear.forEach(m=> if(m.month === selectedMonth) // return something)
All in all good solution and it would be a lot better if you remove the designe directory from you github repo as it is just a liability and it takes space for no good purpose
Happy Coding :)
Marked as helpful1 - Instead of declaring constant variables like this:
- @sami-chhibiSubmitted over 1 year ago
- @LoaiEsam37Submitted over 1 year ago
Any suggestions on how I can improve and reduce unnecessary code are welcome!
Thank you. 😊✌️
- @sebg02Submitted over 1 year ago
any suggestions for better practices?
@arberlisajPosted over 1 year agoHi fellow developer :) ! First I would like to compliment you on completing this challenge and a warm welcome to the community
I might have a couple of suggestions that might help you in the future :
- You want to use as much semantic html as possible for instance
<div class="card">
could be replaced with<main class="card">
or<section class="card">
- Also the naming of the css variables should not start with capital letter it would be better if it was just
--lightGray-clr
ofr--light-gray-clr
All in all great solution I hope you have a great time in the community. Happy coding!
Marked as helpful0 - You want to use as much semantic html as possible for instance
- @regret546Submitted over 1 year ago
I am pleased with the results of my third challenge on Frontend Mentor. It would be great if someone could review my code and provide feedback on any redundant elements or suggestions for writing cleaner code.
@arberlisajPosted over 1 year agoHi fellow developer ! First of all I have a couple suggestions about the designe and the folder structure although your solution looks clean
- You want to use a bit more padding on the right container to make it look a bit more eye pleasing
- In the GitHub repo you want to delete the designe folder and the readme guides to save up space and for cleaner folder structure
- Instead of spamming a bunch of divs you could use semantic elements like
article
section
andaside
just to make an example
All in all great solution i appreciate the effort you are putting into this industry and keep coding I am with you :)
Happy Coding !
Marked as helpful0 - @cassialitySubmitted over 1 year ago
Hello!!
I worked hard to make this app, I know is simple but I did my best.
Please, all suggestions are welcome!
@arberlisajPosted over 1 year agoHi Fellow Developer :) ! First of all I would like to congratulate you on completing the Age Calculator App and i would like to make a couple of suggestions to fix some bugs and boost your productivity:
- The Input Element Outline is still red even if no value is provided
- Calculated Data stacks on top of each other and that might be a css error it would be better if you put both in a div and used flexbox
- You can remove the input type number arrows click here for more information
All in all Great Solution and Keep Learning React
Happy Coding !
Marked as helpful1 - @bjoerndeppischSubmitted over 1 year ago
Feedback Welcome!
@arberlisajPosted over 1 year agoHi Fellow Developer I want to congratulate you on completing the Product Review Card and also i had a couple of suggestions that might help you in the future:
- You dont want the css files all over the place it would be way better if it was organised it its own directory/folder for example a css or styles folder
- It would be better if you provide a link in your repository readme for better accessebility github pages might help you a lot !
All in all Great Solution | Keep up the Amazing work
Happy Coding :)
Marked as helpful0