How can i solve this problem with hot-update - reactjs

After a few days of non-coding I went back and after I try to do something or change
the value of text in component in my app and I did noticed that my localserver is not respoding.
everytime i need to refresh the browser, the console shows it to me --> http://localhost:3000/main.771124e74a556866ffcc.hot-update.json net::ERR_INTERNET_DISCONNECTED
I create app with (CRA)
enter image description here

Related

image path from db stop application in React js

I want to display user profile picture to get image name from db. I am writing code like this
I am getting image variable from api userData?.picture
<img src={require(`../../assets/img/userprofileimages/${userData?.picture}`)} />
But my app stop to work nothing dispaly. can any one help please

Daynamic routing page in not coming, when use browser back button in next js

In a Next.js project, I am coming across a situation where I get a new URL path from an API. And I have to update that URL path in the browser without reloading that page.
I am doing that with the help of History.pushState()
window.history.pushState(nextState,nextTitle,nextURL);
window.history.replaceState(nextState,nextTitle,nextURL);
With help of History.pushState() I am able to update the URL in the browser without reloading that page. But If after I change that URL multiple times and change to some other page. Then if I start pressing the browser back button, I am not able to get that page with the last URL path showing in the browser.
Only that last URL path shows up in the browser URL input, but that page data is not reflected.
Attaching the sample code and reproducing steps video link below. Any help and suggestions are appreciated.
Source Code
Codesandbox
Reproducing Steps
I am also facing same problem, after using history.pushState() browser back button will not work in that page, because according to browser you never went to that page.
That location doesn't exists in JavaScript history object.

Coreui React dashboard keeps refreshing continuously

I am very new in React. As part of a dashboard development I am trying to use COREUI react template.
https://coreui.io/
Installed everything and when trying to execute I have got the dashboard opened without much trouble.
But it looks like it automatically refreshes every 2-3 seconds without any change in page. And in terminal I can see below message.
What I did wrong or do I need to do something from my end to fix this behavior?

How to implement the Google Tag Manager with a React web project and how to check it's working on every page?

How to implement the google tag manager in react project. I already pasted the script code on index.html and code in the body tag.
And it also working am getting API hits on the network console.
note: I don't have any App.js in my project.
enter image description here
But I need to know is enough or not.
if I move to any other page by clicking the link on the home page GTM API is not in the network console?
How to check it's working on all pages?
Inspect the web page
Go to the console tab
type: "dataLayer", if this property exists, then GTM is set correctly. You just need to create the tags and triggers in GTM to track the events that you need

React Native Active Image Link Not Working

So I am having a really weird problem. I'm not sure if it's my server thats is causing the problem or it's my react code. Right now I am trying to load an image using this code in my app:
<Image style={styles.image}
source={{uri:'http://www.test.com/admin/images/profile/'+this.props.active.bid+'.jpg'}}
/>
The link is a correct link and image displays if you go to the actual link, however in my app it doesn't display the image.
The file permissions on the image are 644 and I have 1 image working, however whenever I try to remove that image from the server or rename it to be the correct image for the 2nd profile it still shows up for the 1st profile and not the 2nd. If I delete the image the app still receives it for the 1st profile even though it shouldn't show up, if I go to the weblink the image doesn't appear.
Does anyone have any ideas?
To fix this problem you just have to reset the simulator.
To do this go to Simulator - > Reset Content and Settings...
This deletes all of the data on the device so beware if there is something on there that you cannot restore.

Resources