Coreui React dashboard keeps refreshing continuously - reactjs

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?

Related

React in electron. change electron always on top on code event

I have been hired for a project.
This project is a react app wrapped in an electron.
The electron browser windows setting is set to alwaysOnTop.
I need to be able to toggle this on run, from the react code.
I tried to get the app or window by importing from the electron lib. as shown here, and descripted here
import { app, BrowserWindow } from 'electron'
The browserwindow doesn’t exist when doing this, and breaks the app.
The app is there. but I can't figure out where to go from there, since it contains a lot. but doesn’t look like there is anything relation to the browser window. (Inspect it by logging the app out when running the app)
If anyone out there know anything about how to get this working, I would be a happy panda.
Anyway, Thanks for your time
----- UPDATE BY REQUEST ----
I am trying to get access to the window that the application is running in so I can change the alwaysOnTop properties for the main application, by something like an event, fired in the application.
If I Import the BrowserWindow, the system will run. but whenever I try to read anything from this. this system breaks. I know that BrowserWindow is not an object. But I can't seem to see if BrowserWindow should contain a way to get the current open window.
I'm not trying to read the BrowserWindow before it is created. since I am trying to read it for the main window. and not a new BrowserWindow.
The Electron app have json setting. In this there is browserWindow setting, with the alwaysOnTop value. as shown below. If I change it to false, the main App is not running as always on top. But from default I want it to run as always on top. and the from an event like a button click, in the react part of the system. set it to false.
{
"browserWindow": {
"alwaysOnTop": true,
}
}
Hope this helps explain my problem. if not. let me know.
thanks for your time

React live server is not displaying anything just showing the tab keep on loading

i'm working on a react app (using create react app) but my live server is not working. When ever i start it i.e run the command of npm start it open a browser tab and keep on loading... Anyone knows whats the issue.
Actually, there was an infinite loop in my program. I was calling a component inside it. Which was causing the issue.

How to get React app to render, right now it loads but doesn't render

I'm working on a react application, that works perfectly until it's built for deployment.
My repo is here:
https://github.com/aiglinski/qr_app.git
I've tried for the better part of two days. I would post code, but at this point I'm so lost I wouldn't even know where to start.
The app does load. If you open the console all of the elements show, and I can manually enter different paths and those load, but nothing shows beyond a blank screen.
Thanks.

How to use the rehydration with mobx-persist

I am new to mobx-persist. I am not able to figure out how rehydration works in mobx-persist. I tried asking about it in github but got no reply so far. I am wondering if anyone here is able to point me the right direction.
The problem that I am trying to solve is to prevent losing the react states on the page refresh. I want to keep the stats in the session storage and load them back when the page is refreshed. (Note: I managed to do it by accessing the session storage directly from the react store but I thought that mobx-persist might do the better job.)
I created a sample here. https://github.com/michaelsync/js-lab/tree/master/mobx-persist-sample.
You can use the following command to run the sample.
yarn install
yarn start
It has two components called "entry" page and "result". User can enter something in "entry" page and show that data in the "result" page. There is one store called userDataStore that has only one property called data.
When you click on "Click Me" in the entry page, the data that you typed on text box will be saved in user data store. and it retrieves the data back from the result page.
The issue is that when I refresh the page, I still lost the react states. I guess it's because I don't understand how rehydration works in mobx-persist.
The steps to replicate the issue ~
run the program by using yarn start
enter something in textbox and click on "Click me" (It will redirect to the result page)
you will see what you entered in the result page.
Refresh the page (press F5) - the data will be lost.
Can someone please help me with the steps that I need to do in hydration and rehydration?
Note: I don't want to use any server-side code or isomorphic rendering to sync the states for now. using the session storage might be anti-pattern but I see it fit in my tiny project.

Ionic content shows up only after clicking on SideMenu

I have an ionic App which was working fine but now It is showing little weird behaviour, When I run the app it does not show the data at first but when I click on side menu once or twice then it loads and shows the data. I have an nodejs api from which the data comes to my app and the same api has been put in aws api gateway, I noticed this behaviour since I implemented aws sdk for binding data in my APP.
What can be the root cause for the same?
I can share the code but I am not sure where the issue is whether in controllers or views?
I solved it using Ionic Loader as the reponse was taking long time. My side menu was not getting initialized with the same time as other views hence views were not rendering without sidemenu being rendered, The idea is to show a loader on every response and hide it when it's a success, so it will render the views successfully.
Hope it helps.

Resources