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

Package structure #1

Open
ghengeveld opened this issue Sep 2, 2019 · 1 comment
Open

Package structure #1

ghengeveld opened this issue Sep 2, 2019 · 1 comment

Comments

@ghengeveld
Copy link
Member

ghengeveld commented Sep 2, 2019

We should settle on a general direction for package structure and naming. This issue is not for discussing package details, but to discuss where to cut them up or merge them. Refer to packages/react-async/src for an overview of what's currently there. The goal is to offer a way to later add new features without affecting the existing functionality, by using separate packages.

Current idea:

  • @async-library/core Core features, library agnostic: reducer, status, globalScope
  • @async-library/devtools Chrome DevTools extension, supports all libraries
  • @async-library/react-async-component React Component with Render Props API (<Async>) and its helper subcomponents (aka classic React Async)
  • @async-library/react-async-hook React Hook (useAsync) and standalone helpers
  • @async-library/react-fetch-hook React Hook (useFetch), depends on react-async-hook
  • @async-library/vue-async-composition Vue.js Composition, following the Vue Composition API

Questions:

  • How do we deal with propTypes? Do they go in core somehow? Can we generate them from TypeScript?
@AlbertBrand
Copy link

Sounds like a proper split, although @async-library seems a bit long. Also, vue-fetch-composition can be split off from the Vue parts.

For getting cross lib props right I would generate them, probably from a typed model (TS seems fine for this). A description in JSON would suffice as source model as well.

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

No branches or pull requests

2 participants