Skip to content
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.

Refactoring extension-related code to use hooks #419

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

elvisisking
Copy link
Contributor

  • see Trello card
  • all packages/ui/Customization/extensions code has been refactored
  • all syndesis/modules/extensions code has been refactored
  • TODO: refactor packages/api code (WithExtension, WithExtensions, WithExtensionIntegrations)

- converted React.Component to React.FunctionComponent
- added notifications for successful and failed imports
- i18n'd a few things
- replaced WithExtensionHelpers with useExtensionHelpers
@riccardo-forina
Copy link
Collaborator

PR Storybook available here

Copy link
Collaborator

@riccardo-forina riccardo-forina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, in general, it looks ok but there is a lot of repetition in the useXyz hooks.
I have recently added a useApiResource hook that can be used to DRY the API related hooks. See a simple example here or a more advanced one here

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

Successfully merging this pull request may close these issues.

2 participants