-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
docs(env-variables): Add cURL example for refresh endpoint #10829
docs(env-variables): Add cURL example for refresh endpoint #10829
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a small comment; not sure if it's worth documenting but we want to avoid confusion wherever we can.
I'll leave it up to you!
Co-Authored-By: riddla <volker.rose@gmail.com>
Thanks for the addition. Makes totally sense. |
Holy buckets, @riddla — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
@DSchau, I was wondering if a small helper component like the following would/could make sense, also for others: import React from 'react'
let style = {
// ...
}
const RefreshContent = ({ children }) => (
<button onClick={refresh} style={style}>
Refresh content
</button>
)
function refresh() {
console.log('refreshing content')
var oReq = new XMLHttpRequest()
oReq.open('POST', 'http://localhost:8000/__refresh')
oReq.send()
}
export default RefreshContent As I'm new to the Gatsby ecosystem I don't know if those kind of (development) helper components already exist, where I could put them etc. |
…10829) <!-- Have any questions? Check out the contributing docs at https://gatsby.app/contribute, or ask in this Pull Request and a Gatsby maintainer will be happy to help :) --> ## Description I added a cURL example for the refresh endpoint e.g. http://localhost:8000/__refresh. ## Related Issues Related to gatsbyjs#10328.
Description
I added a cURL example for the refresh endpoint e.g. http://localhost:8000/__refresh.
Related Issues
Related to #10328.