-
Notifications
You must be signed in to change notification settings - Fork 760
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
[Bug] reloadClientData() does not reload site data #1093
Comments
The double call will be fixed in the patch version I'll release later today. Huzzah! |
Doesn't this fix also require the above mod to
EDIT: Actually even with that mod it isn't working for me with RS v7.1.0, but I'm just editing runDevServer.js. Maybe I need to rebuild something? Looking at the PR I think I may have misunderstood the fix so my change isn't necessary in theory. However, this is not working for me. If I call @Blobson does this still work for you in v7.1.0? |
It doesn't fully work and I think the reason is the |
I tried putting that in without success. It's it just a matter of editing or would I need to do anything else? I have RS installed globally with yarn.
…On 11 August 2019 18:09:10 BST, Vladimir Klimov ***@***.***> wrote:
It doesn't fully work and I think the reason is the `fetchSiteData()`
call missing in runDevServer.js
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#1093 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Try editing version inside node_modules/react-static/... |
Still no joy with this in my node_modules RS:
|
As I remember Tenner had reworked the code a bit. I can take a closer look at it after I return from vacation on 18th of august. |
@theWebalyst certainly, although your issue might relate but not equate. After the maintenance update I'll actively work on React-Static including these issues. |
Hey i'm running into the same problem now. I'd love to contribute and will start based on the above. If anyone has more insights im sure it would be helpful |
Hey I made a PR to try and fix this by adding |
@SleeplessByte i believe this can be closed now? it works with my locally built version |
@krishan711 :) |
Short description
I am using site.yaml file to store site data and in development mode I want to hot-reload site data on every change in site.yaml.
Steps to reproduce the issue
const { title } = useSiteData()
to the src/App.js component like this:Also in the stdout of dev server you'll see that
reloadClientData()
is called but it does not trigger call forgetSiteData()
.Solution that worked for me
For now the only solution that worked for me is to add:
inside
reloadClientData()
inside runDevServer.js here.The only downside is that now
getSiteData()
is called twice at the start of development server.The text was updated successfully, but these errors were encountered: