Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Feature: Switch from static json to live data #38

Closed
3 tasks done
bdougie opened this issue Dec 24, 2021 · 5 comments · Fixed by #74
Closed
3 tasks done

Feature: Switch from static json to live data #38

bdougie opened this issue Dec 24, 2021 · 5 comments · Fixed by #74

Comments

@bdougie
Copy link
Member

bdougie commented Dec 24, 2021

Type of feature

Feature

Current behavior

The API is currently a static file. This was meant to be temporary while the UI was being integrated.

Desired solution

Fetch from https://api.opensauced.pizza instead of the data/posts.json.

Note:

  1. Caching may be needed
  2. Pagination will need to be considered.

Additional context

@bdougie will be working on this in multiple steps.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bdougie
Copy link
Member Author

bdougie commented Dec 26, 2021

After some research, I think this can be completed as an infinite scroll and incremental data loads.

https://medium.com/suyeonme/react-how-to-implement-an-infinite-scroll-749003e9896a

@kelvinsekx
Copy link
Contributor

I will read through the article likewise...

@bdougie bdougie mentioned this issue Jan 6, 2022
15 tasks
@bdougie
Copy link
Member Author

bdougie commented Jan 6, 2022

Something else that came up while working on #67 is there will need to be a global state, i.e Redux store to manage the following.

  • infinite scroll
  • filtering votes
  • and the combination filtering scroll/pagination

@0-vortex
Copy link
Contributor

0-vortex commented Jan 6, 2022

How do you feel about starting off simple with react context? I know there have been unresolved talks and experimentation around context selectors but ultimately we could couple useContext with useReducer and get rid of some complexity moving forward.

Some other interesting reads on this topic:

@github-actions
Copy link

🎉 This issue has been resolved in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants