I’m trying to make a slideshow in my react app. I’m using the below function for the slideshow. When I run the code the slideshow works. But as soon as I refresh the page all the contents in the page disappears and I get the following error in my console. I’m not quite sure why it stops work…
Tag: reactjs
Implementing conditional rendering – blank page being returned
A login state is being generated from the “LoginPage.js” code up to the “App.js” component so that I can implement conditional rendering based upon the login state which can be “true” or “false”. I have attached the files below. My website still shows the login …
My browser sends fetch data request continuously and it gives pending status after giving 200 several times in react
I’m trying post some data in mongodb database and it works perfectly until the fetch request is sending continuously even if I didn’t do anything. In the network tab, it shows 200 status firstly but then pending and gives error. The error is giving after adding the following code: The following er…
Why am I getting an error in my Route Redux code?
I can’t find my error in the code. Could someone explain to me. Test: Nav:’ should be rendered on the path “/”. The “Home” component should be rendered only on the path “/” The “Home” component should not be displayed in any other route The route …
How do i use chartjs in react project properly?
Im trying to use chartjs in my react project but it doesnt work. What am i doing wrong? You can see console logs here: logs Answer The attributes you’re passing to Bar are incorrect. Specifically, your data attribute is missing its own datasets attribute, as can be seen in the error log when Chart.js is…
ReactJs – Ant design Tabs Card does not render content
My components used ReactJs Framework that built with Ant Design UI. My stucking is the rendering on tabs content. I try to nest the LoginForm component to TabsCard component. Note: the LoginForm component can successful independently rendered without nesting case. Component rendered on image I attachted: Here…
how to spy on window.location functions?
i need to cover my code with some unit tests and in one of then i have the following situation. app.tsx and in my test file i’m getting the followein error : Cannot assign to read only property ‘replace’ of object ‘[object Location]’ i’ve tried other aproachs like }); but i…
How to get value from TextInput and set it with Button React Native?
I want to assign the username I get from a TextInput to a username variable via a button and output it in the text below. Meaning, if the user enters the username nothing happens but when the button is clicked the entered username will be shown in the text. How can I achieve this? Answer You need to keep that
React App adding Pure CSS to Tailwind CSS
I need to do this in tailwind CSS for my react application. How can I do that? HTML CSS This is the same thing in the above code pen link. Answer
How to bind states and functions in different components without Redux?
I have a Main page, it has the findUser() and inputValue values, I want to make a static application header, but it has an input that requires findUser() and inputValue to use it, how can I pass them correctly (this can be done without Redux ?) Main page: App: Answer You could use the Context API from React a…