Closed PejmanNik closed 11 months ago
Any update on this ticket ...
No, against my first guess, it is not easy to fix as at the time of splitting components in page content the usePageInfo hook returned 0, and the component converted to a Fragment
as a workaround for now, you can put your logic in a separate component (that return null, render nothing) and uses usePageInfo inside it, then wrap it in with Layout component (with disableSnapshot)
<Layout disableSnapshot>
<PageNumberLogic />
</Layout>
@PejmanNik I'm sorry, I didn't understand...
Is it possible to create a sample code in codesandbox demonstrating it.
Thanks... Its working.
usePageInfo hook returns the default value when it used inside the PageContent
https://codesandbox.io/s/jikji-test-page-number-8cvsq3