wanderlust icon indicating copy to clipboard operation
wanderlust copied to clipboard

Separating backend calls into a separate file or folder

Open devsharmagit opened this issue 10 months ago • 4 comments

Description

This issue is raised to separate the Axios or data fetching calls to a separate folder or file so that the code becomes nice and easy to maintain and scale.is raised

Current Behavior

image Currently, we are doing the backend calls in use effect of almost every component.

Proposed Enhancement

  • Making a Separate folder named "Services" and store call logic there
  • export function which can be used in useeffect to initiate the backend calls.

Use Case

This will help to maintain the code and Implement the DRY principle as well

Blockers

No response

Additional Information/ Attachments

No response

devsharmagit avatar Apr 08 '24 12:04 devsharmagit

Thanks for the issue, yeah I totally agree with you @devsharmagit, can we take it one step further and use react query? that will be cherry on top

krishnaacharyaa avatar Apr 08 '24 12:04 krishnaacharyaa

@krishnaacharyaa yeah that will be really great. I dont have much experience with react query. but if you can guide me then I may be able to do this

devsharmagit avatar Apr 08 '24 16:04 devsharmagit

I would love to resolve this issue & I am a GSSOC 24 contributor.

  • [ ] Organise the useEffect Code.
  • [ ] Use react query

razerbotog avatar May 14 '24 21:05 razerbotog

I hope you're doing great! As a GSSoC contributor, I'm keen on ramping up my involvement for GSSoC'24. Could you please assign this issue to me? I'm excited to continue contributing to the project. Thanks a bunch!

iamrudhresh avatar Jun 05 '24 06:06 iamrudhresh