prismic-client | official JavaScript + TypeScript client library | REST library
kandi X-RAY | prismic-client Summary
kandi X-RAY | prismic-client Summary
The official JavaScript + TypeScript client library for Prismic.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of prismic-client
prismic-client Key Features
prismic-client Examples and Code Snippets
Community Discussions
Trending Discussions on prismic-client
QUESTION
I'm in the middle of building a next.js app, and I need to make a request for the navigation content to my Prismic
API server-side, get the results, and pass them to my Header
component so that I can have a persistent navigation menu. I don't want to include the header in every page component, nor do I want to have to query the document in every page. Is there a way that I'm able to access getServerSideProps
, getStaticProps
, or getInitialProps
within my _app.js
so that I can have that persistent nav? Here is my _app
component, as well as my Prismic client, and my index
page component, so you have an idea of the code I'm workin with.
ANSWER
Answered 2021-Jan-08 at 11:39You can add getInitialProps
to your custom _app
page (getServerSideProps
and getStaticProps
are not supported).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install prismic-client
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page