@Kerri-AnnBates
Posted
I think this looks great! Yes, a JS framework would make the JS code more maintainable and readable, but doing it from scratch the way you did is a great way to solidify your JS foundation before moving on to working with a framework.
I noticed from reading through your JS code on line 26 - 28 that you created class names for the card title by replacing a space with a dash using .replace() method. I know that the json data provided did not have any titles with more than one spaces, but just as a buffer, consider using .replaceAll(). Some titles might have more than one spaces that you would want to replace. Something to think about in the future.
Keep it up!
Marked as helpful
@Willwf
Posted
@Kerri-AnnBates Thank you very much for the feedback. It's very appreciated. I'm gonna implement your tip about the .replaceAll() method, since I found it very useful. I hope that on my next work I'll be able to use frameworks, but sometimes I find very difficult to understand some things, like hooks in React. I guess that it makes all more challenging.
@Kerri-AnnBates
Posted
@Willwf You're welcome! And I can totally relate, hooks are confusing, and new technology is difficult to understand but with time, things will start to click the longer you stick with it.
Good luck :)