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

feat: creating useRegisterXModule composable #1399

Merged

Conversation

albertjcuac
Copy link
Contributor

@albertjcuac albertjcuac commented Jan 25, 2024

Pull request template

Every x component uses the x-component.mixin.ts to register the related x module. Currently when a component is imported the x module is registerd. We need to check if this is needed or is it okay to register the module when the component is instantiated. Within this task we should create a new composable that is able to receive a AnyXModule and register it in the XPlugin via. I have created the composable and tried it out in different cases, if you register the module in the setup() it can be accessed from the template, created() and mounted().

Motivation and context

  • Dependencies. If any, specify:
  • Open issue. If applicable, link: EMP-3424

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

  • Main
  • Other. Specify:

How has this been tested?

Tests performed according to testing guidelines:

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review on my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@albertjcuac albertjcuac requested a review from a team as a code owner January 25, 2024 07:26
@lauramargar
Copy link
Contributor

Great job!!
Could you resolve the conflicts please?

@lauramargar lauramargar merged commit 850a741 into main Jan 30, 2024
4 checks passed
@lauramargar lauramargar deleted the feature/EMP-3104-Create-useRegisterXModule-composable branch January 30, 2024 14:03
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

Successfully merging this pull request may close these issues.

2 participants