rendercycle Nan, env="browser"

This is a follow-up on this post: https://www.wix.com/code/home/forum/questions-answers/rendercycle-always-returns-nan

I have moved all my database actions to web modules, but the problems stays the same: within the .onReady, rendercycle always returns Nan, but .env returns “browser”.

The main code block, as displayed in former post, is still the same.

Could anybody explain to me why it returns Nan? Am I doing something unexpected?

P.S. I am testing on Desktop, not Mobile.

Hello Giri,

The rendering process is split in two in order to improve performance. The first cycle in the process happens server-side and the second cycle happens client-side. When not possible, all rendering happens client-side.

When the rendering is split, renderCycle returns 1 on the server and 2 on the client.

When all the rendering happens client-side, renderCycle returns 1 while the rendering process is still running.

In either case, after the client-side rendering has finished, renderCycle returns NaN.
It looks like your console logging after the renderCycle has finished.
Read more about usage and examples here .

Goodluck,
Majd