Hello Sir,
Please try that code, your both problem we will resolve.
Thanks
Khelesh M
DexignZone Team
And when removing this, does something break in the app? because if it is, I imagine that a specific function must execute.
Please if you can answer my first and second question.
Norberto.
Hello Sir,
Please check the screenshot to change some code.
check: https://prnt.sc/1t78vnj
File Path: gymove\src\App.js
Thanks
Khelesh M
DexignZone Team
Another problem that it detects, is that changing the size of the layout, it re-renders everything, and therefore it also calls the APIs again.
I don't think this is a problem, but it can consume unnecessary resources.
attached files:
attached files:
Hello sir,
Please check CSS files that is including or not.
or
can you share your update package zip here to check it that what is the CSS issue.
Thanks
Khelesh M
DexignZone Team
Dear.
First of all, sorry, I am using the translator, since my native language is Spanish.
I am editing the theme based on react.
But I'm noticing that on many occasions it renders 2 times, and it also makes calls to an API twice (in case of having a fetch).
From what I see, this is due to the way routes are rendered, using the map method.
Example, in the login page, I add this code:
const getData = () => {
return fetch('https://jsonplaceholder.typicode.com/todos/1');
};
useEffect(() => {
const func = async () => {
const data = await getData();
const value = await data.json();
console.log(value)
};
func();
}, [])
When I check the console, when the page loads, it makes the call twice, I can't allow that.
If I replace the routes in the "routes.map" with a single normal route:
<Switch>
<Route
exact
path={`/path/`}
component={<Login/>}
/>
</Switch>
the problem is solved, the issue is that I lose the styles that are conditionally in the DIV container of the Routes.
I would like to know how to solve this problem.
On the other hand, in the demo that comes in HTML, the calendar allows you to create events, the react version does not allow this and it looks different.
Thanks.
attached files: