Please take a look at my page, https://kuncung38.github.io/portfolio-website/ When I used live server from VSCode, everything works just as expected, When I uploaded this to github pages, a weird bug appeared. You will notice the problem, it has a weird behavior when you clicked either button, you will have t…
Category: Questions
I want to add a color to the highest number in the column row on the table [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 months ago. Improve this question Original Version What I expect I need to do my table like this but I don&…
why is this Vuex state syntax throwing error?
I’m quite new with Vuejs & Vuex, I created a local project just to practice, so I have a file called: employeeList with an Array of objects. I’m trying to pass that same Array as state in Vuex, but is throwing me errors. I assume the syntax is wrong, please tell what would be the correct appro…
Collecting random year from Random Date
So I have generated a random date from two dates Now I need to collect the year of the random date generated with the code: var yearOfInterest = dateOfInterest.getFullYear(); This does not work. I would appreciate the assistance. Thank you. Answer A function definition does not need the var, just assign the f…
Error React createElement type is invalid expected a string for built-in components or a class function for composite components but got object
I am trying to change my client side rendered react app to be rendered on server side. I am using React with TypeScript. Here is the error: Here is my package.json dependencies: And here is my rendered.js class where the error seems to be triggered: And here is my index.tsx file: I’ve tried changing the…
TS7053: TypeScript error when handling input id och input value
I get this Typescript error in terminal: TS7053: Element implicitly has an ‘any’ type because expression of type ‘string’ can’t be used to index type ‘CustomForm’. No index signature with a parameter of type ‘string’ was found on type ‘CustomFormR…
Replace ‘n’ in String variable to so that it shows line break when displayed in
I have a textarea in React that also accepts newLine characters. It is correctly stored in mongoDB with the newLine characters. When I retrieve it back to React and try to display it in table <td>, it shows with spaces. But if I put it on console, it is correctly shown. I guess that is because in HTML n…
node.js find attributes with same value in multiple JSON files
Hey I would like to ask if it is possible to find lets say in 10 JSON files which are looking like this: 1.json: 2.json: And so on… just different attribute values. Lets say I want to find only towns with People > 2500 and I’m not even sure if it is possible or do I need to upload the
Sort array without any sort methods using JS [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 4 m…
How can I sort and operate on unique key values
I want to iterate though an array of different ratings, sort by each unique id, sum and calculate the average of each id’s ratings. Then save the averages in a new array, where I can call something like averageRating[i], where each entry will be each id’s rating. The original array of objects look…