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 auto refresh/auto fetch #9

Open
anasvakyathodi opened this issue Oct 9, 2020 · 4 comments
Open

Add auto refresh/auto fetch #9

anasvakyathodi opened this issue Oct 9, 2020 · 4 comments
Assignees
Labels
good first issue Good for newcomers react

Comments

@anasvakyathodi
Copy link
Collaborator

Posts data in the /posts path must refresh data after submitting a post in the newpost (/new) page.
Till Now, user have to refresh the posts page after submitting post.

@karmanya007
Copy link

There is no /new endpoint's implementation in postRoutes.js.

@anasvakyathodi
Copy link
Collaborator Author

anasvakyathodi commented Oct 9, 2020

There is no /new endpoint's implementation in postRoutes.js.

What I meant is... there is a path https://dev-pad.netlify.app/new
where we can upload post

image

After submitting... there is a message showing successfully submitted...also post fetching function is inside context file, where you can change the data while the submission is success.

Present condition is:
After submission, there is no fetching happened after submission... hence no new postes are shown

@karmanya007
Copy link

Okay. Can I work on this then?

@anasvakyathodi
Copy link
Collaborator Author

anasvakyathodi commented Oct 9, 2020

Okay. Can I work on this then?

Sure... and if you have doubt of endpoint.
This may help:

image

/ is used as post method in postRoutes.js

It's used in server.js is as

image

So endpoint will be

/posts/ with postmethod

And I don't think backend stuff doesn't need for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers react
Projects
None yet
Development

No branches or pull requests

2 participants