Timeline for SSR Component Level Data fetching in JSS?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 25 at 13:40 | comment | added | Richard Seal♦ |
if you have another question, please create a question vs posting a comment. Although IMO - you shouldn't ever use getServerSideProps
|
|
Sep 24 at 18:17 | comment | added | Anekar Vishal | then when should we use getServerSideProps approach | |
Sep 30, 2022 at 21:39 | comment | added | Ben Sewards |
I'm failing to understand the purpose of getting external data through the hook useComponentProps then. Most front-end developers use Storybook, and even if you pass in props from storybook arg (data) that came from a Sitecore LayoutData json response, the hook fails and breaks the component.
|
|
Jul 29, 2022 at 11:04 | comment | added | Michael Bester |
Thanks @RichardSeal, your suggestion to abandon the getServerSideProps approach was definitely the way to move forward. It's unfortunate that the Sitecore docs don't make any mention of the rendering method distinction when they talk about using that for component level data fetching. They suggest "just do this and it will work" without context. Even the Sitecore support person we were in contact with basically said "just do this and it will work". Very frustrating. Thanks again for your guidance.
|
|
Jul 29, 2022 at 10:56 | vote | accept | Michael Bester | ||
Jul 22, 2022 at 16:54 | history | answered | Richard Seal♦ | CC BY-SA 4.0 |