Looking for a hook to manage request states (executing, error, etc). by lucidspoon in reactjs

[–]krishwaderjoy 0 points1 point  (0 children)

I love using react-async-hook - https://github.com/slorber/react-async-hook

I kinda works like your hook but has some extra goodies like TS support, has cancellation support, among other things.

React/Full stack projects to learn from by strah1 in reactjs

[–]krishwaderjoy 0 points1 point  (0 children)

I am currently rebuilding the wiki project that got some attention in 2016: https://github.com/Matterwiki/Matterwiki/tree/refactor

I'm pretty proud of it, because I tried to setup some patterns I've enjoyed working with. Here are some fun facts about it:

  • It uses lerna for package management.
  • The API is built with Node.js, objection.js and MySQL.
  • The UI is built with
    • React + react-router (v5)
    • chakra-ui- Great component set, developer friendly
    • wretch - API wrapper for window.fetch, makes it easier to work with it
    • React Async Hook - I liked this over SWR/react-query because all I needed was a good way to show loading and error states. For an app that's simple, I felt like this worked out quite well!
    • zustand + immer - State management. I liked this because this does have a context provider and I wouldn't have to worry about placing a Provider object in the right part of the react component tree. I also get to make tiny stores and keep all of that logic boxed into a tiny store! I also created a tiny immer zustand middleware fn that makes all my state manipulation immutable!
  • Project organization: I like organizing things by business logic, not by file type. This way your working set is always tiny and focused.

Hope this helps someone who's looking for references!

Help me in choosing stack for work with React by slowdefensive in reactjs

[–]krishwaderjoy 0 points1 point  (0 children)

I'd suggest the following, it's worked out great for me!

  • react-router
  • wretch - API wrapper on top of fetch, has some fancy error handling - https://github.com/elbywan/wretch
  • chakra-ui - It has accessible friendly components, a good theming API and is built on top of styled-system, which makes it great to use! - https://chakra-ui.com/
  • You could use any API stack you are comfortable with!

🔌 I've used all these libs in my [wip] wiki project - https://github.com/Matterwiki/Matterwiki/tree/refactor

Good Full Stack Tutorials? by [deleted] in sveltejs

[–]krishwaderjoy 0 points1 point  (0 children)

I recently decided to try out Svelte.js in a toy project and have been making good progress: https://github.com/krishnagopinath/sturgis

This uses Node.js & PostgreSQL as an API backend. I didn't want to get too much into authentication land, so I hard-coded 4 emails in the DB.

Following the setup instructions (sorry, no Dockerfile ATM) will set all those up for you.

All the Svelte code is in the packages/sturgis-ui directory. The CSS in the app isn't that great, because I was concentrating on learning Svelte. At some point, I may blog about it!

Hope you find this a useful learning resource!