You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a Page component to show a table, into the handler of the Page I am calling a function to query a DB and this function is called many times ramdomly which could be a bit problematic
Example:
export default new Page({
name: 'Users',
handler: async () => {
const data = await getAllUsers()
return new Layout({
.
.
.
getAllUsers() is being called many times
Solution
Handler should be executed only once at the moment of render the page, or even better it would be nice have a way to control it. At least it would be necessary have a some explanation on the documentation when and why the handler function is executed.
The text was updated successfully, but these errors were encountered:
I am using a Page component to show a table, into the handler of the Page I am calling a function to query a DB and this function is called many times ramdomly which could be a bit problematic
Example:
getAllUsers()
is being called many timesSolution
Handler should be executed only once at the moment of render the page, or even better it would be nice have a way to control it. At least it would be necessary have a some explanation on the documentation when and why the handler function is executed.
The text was updated successfully, but these errors were encountered: