Adding a Header
See original GitHub issueHey love what you built here. There aren’t a lot of apollo examples that don’t store a jwt token in localstorage and use that to determine if a user is logged in, so glad to see a solution using sessions!
I’m curious to see how you would handle something like a Header
component that’s outside of your AuthRoutes, but that reflects the current auth state by either showing Login/Register or Logout. So when I log in, the header then knows to update and show the logout link.
so something like:
<ApolloProvider client={client}>
<Header />
<Routes />
</ApolloProvider>
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Insert a header or footer - Microsoft Support
Select Insert > Header or Footer. · Select one of the built in designs. · Type the text you want in the header...
Read more >How to Add a Header in Microsoft Word: 12 Steps (with Pictures)
1. Open Microsoft Word. It's a blue app with a white "W" on it.
You can also open an existing document by double-clicking it....
Read more >How to Insert a Custom Header or Footer in Microsoft Word
1. Click the Insert tab. It's at the top of Word.
If you've already inserted a header or footer and want to edit it,...
Read more >Word 2016: Headers and Footers - GCF Global
To insert a preset header or footer: · Select the Insert tab, then click the Header or Footer command. · In the menu...
Read more >How to Insert Headers and Footers in Microsoft Word
After you select a style, Word will automatically switch from the Insert tab to the Header & Footer tab. This tab only appears...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here’s the docs on it: https://www.apollographql.com/docs/react/essentials/mutations.html#update
Here’s an example of me using it in a project: https://github.com/benawad/slack-clone-client/blob/2588510aeb4ed9127ae64eb21072307468dae79b/src/components/AddChannelModal.js#L76
thx 🙇♂️ ! exactly what I was looking for.