-
Improvement
-
Resolution: Done
-
Neutral
-
None
-
None
-
-
Empty show more show less
-
HL & LD 41
-
3
Take nextjs-ssr-minimal example from
https://git.magnolia-cms.com/projects/DEMOS/repos/minimal-headless-spa-demos/browse?at=refs%2Fheads%2Fnextjs
We want to fetch Template Annotations in the browser to have p13n working (session cookie to have correct selected variants).
We can not render EditablePage, fetch the template annotations, and pass the new templateAnnotation prop to EditablePage, as the components are not updated then.
It is maybe due to storing template annotations in state and not updating state on new props.
Hence we had to use a trick as follows:
https://git.magnolia-cms.com/projects/DEMOS/repos/minimal-headless-spa-demos/browse/spa/nextjs-ssr-minimal/pages/%5B%5B...pathname%5D%5D.js?at=refs%2Fheads%2Fnextjs#98
This causes (my guess here) race condition as page sometimes loads faster then JS loaded by bridge and there is no green bars at all.
Link to the video: https://magnolia-cms.slack.com/archives/G012JS95BRT/p1638970438031400?thread_ts=1638968179.030000&cid=G012JS95BRT
- relates to
-
PAGES-545 Remove active requests check in post message connector
- Closed