Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add with-context-api example #5154

Merged
merged 2 commits into from
Sep 14, 2018
Merged

Conversation

maurodaprotis
Copy link
Contributor

resolves #4182

"start": "next start"
},
"dependencies": {
"next": "latest",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use canary here, as it doesn't work on 6.x

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be "next": "7.0.0-canary.16" ?

Sorry, my first PR 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"next": "^7.0.0-canary.16",

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be good with yarn add next@canary 👍

@@ -0,0 +1,19 @@
import App, { Container } from 'next/app'
/* First we import our provider */
import NoteProvider from '../components/CounterProvider'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wesbos example used NoteProvider
But this here should be called CounterProvider now, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YEs - sorry I ripped this out of another app :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. it should be CounterProvider. I based on @wesbos example and forget to change that import

@timneutkens timneutkens merged commit 1f64082 into vercel:canary Sep 14, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide example using Context API with custom _app.js
4 participants