Dependency Confusion

Prismic Team:

I'm REALLY confused about what packages I'm supposed to be using in my Next.js based project. Digging through your documentation is very confusing, so many of the projects appear to do the same thing.

I'm successfully using prismic-javascript to fetch from your GraphQL endpoints and pull data into my app, that much makes sense.

When I get into templating things I see a bunch of different packages:

What does each one of these do differently from the other? I can't really tell.

1 Like

Hey John,

Welcome to the community!

I’ll be happy to explain the different uses here.

To get a REST API project up and running all you’ll need from our dependency list is prismic-javascript to do your queries and prismic-react to template your data. Although if your working with GraphQL I think you might need to use apollo-link-prismic and we don’t have any detailed documentation for working with that and Next.js. I’ll try to get more info on this for you.

Prismic-react extends both prismic-dom and prismic-helpers to work better with react projects, so there is no need to install those. All they essentially do is parse your data coming from the Prismic API so that it’s in an easier to use format in your projects.

A good place to start is with out Next.js sample projects which are pre-configured exactly how you’ll need them:

Thanks.

@Phil - thanks for the insight. Docs cleanup would be a good thing - towards the fall I could help with such a project. It’s just very hard to reason around your Github right now.

Yeah, we’re planning a documentation overhaul to make things easier to use. Also we have some plans to open up our documentation to allow community contributions, but that’s in the distant future.

This issue has been closed due to inactivity.