Skip to content

Tag: javascript

How to pass id parameter to child route?

I have the following route config and in this example, I can get the id parameter in the StudentComponent by using the route functions. However, I need to pass this id parameter to the child route of this component, but I am not sure if I have to update the following config to pass this id parameter to the Ed…

HTML/Javascript slow/crashing on quiz app

I have a problem with my otherwise fully functioning quiz game. There seems to be crashing/slow loading issues after around 5 or 6 (out of 10) questions. Its very strange because if I answer everything within a second (unrealistic but to error check), there is no problem. But as soon as I take a “normal…

react-markdown and renderers with arguments

I am using React Markdown (https://www.npmjs.com/package/react-markdown) to render markdown content in my NextJS project. I have created a simple component named “ImageRenderer” and I need to pass an argument (in this case the slug) in addition props, to this component but I do not know how: My pa…

How to use Link and Route inside of condition term

So I am trying to move through pages in react, my goal is when I did validate the things I need (name, and number) the page will switch and I will be in another route. (without refresh the page). I tried to do it with window.location but its refreshing the page I cant use <Link> because I want to switch

React How to change view after click on button

I wouldlike to change my view when I click on one Button : For example when I click on the button 1, only View1 is active. If I click on Button 2 ==> View 2 If I click on Button 3 ==> View 3 PS : View1, View2 and View3 are component file (.jsx) Answer There are multiple ways to

Store word context objects in variable

Exploring word add-ins world. Want to create a list of paragraphs and navigate to each by click on it(some kind of table of content) Like that: I have created code(on reactjs, but it does not matter which framework to use) When I click on any button the callback is invoked, no errors in console, but the navig…