admin管理员组

文章数量:1290393

A react app has the following services (and maybe more will be added):

  • ipfs
  • web torrents
  • web3
  • indexDb

I'm not even sure those would qualify as "services" but I don't know what else to call them.

Current folder structure is:

  • src
    • ponents
    • containers
    • css
    • reducers
    • settings
    • util
    • services
      • web3
      • ipfs
      • torrent
      • indexDb
      • api (this is the public api for all the services)

Does this follow best practices?

A react app has the following services (and maybe more will be added):

  • ipfs
  • web torrents
  • web3
  • indexDb

I'm not even sure those would qualify as "services" but I don't know what else to call them.

Current folder structure is:

  • src
    • ponents
    • containers
    • css
    • reducers
    • settings
    • util
    • services
      • web3
      • ipfs
      • torrent
      • indexDb
      • api (this is the public api for all the services)

Does this follow best practices?

Share Improve this question asked Sep 5, 2018 at 23:52 cooldude101cooldude101 1,4153 gold badges17 silver badges33 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

There are so many different ways to structure a React App that it all es down to what helps you, the developer, navigate your files more efficiently.

The 100% correct way to structure a React app (or why there’s no such thing)

If you just want to see some example file structures, you are wele to checkout many popular repos such as create-react-app or react-boilerplate.

本文标签: javascriptBest practices for folder structure for services in a react appStack Overflow