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

Vue 3 support #246

Closed
wants to merge 18 commits into from
Closed

Vue 3 support #246

wants to merge 18 commits into from

Conversation

rigma
Copy link

@rigma rigma commented Aug 20, 2020

With the eminent release of Vue 3, and because it's a requested feature in #230, this PR introduces Vue 3 support for vue-fontawesome.

Changes made in the PR

Converting functional components into stateful components

With the release of Vue 3, { functional: true } component option is removed and performances between functional and stateful components are now negligeable.

As recommanded in the migration guide, components are now stateful.

Using setup() functions instead of render() functions

⚠️ Breaking changes ⚠️

In Vue 3, render functions will no longer receives arguments. As a result, it can no longer access to props or slots and the h function shall be globally imported.

A more detailed explanation of the changes can be found in the related RFC: vuejs/rfcs#28.

Therefore, I've updated the conversion function from converter.js to return render functions that can be used with setup() method of a component.

Refreshing example

I've rewritten the example to showcase the use of vue-fontawesome with Vue 3.

Migrating Jest test cases

Now, the test cases are using @vue/test-utils in order to mount components.

Closes #230

@robmadole
Copy link
Member

Amazing! Thanks @rigma. I will have some time in the next couple of weeks to look over this and move it forward.

@robmadole
Copy link
Member

Alright, I'm focusing on this today. I expect to have an pre-release candidate out today from your work @rigma

@robmadole robmadole closed this Sep 1, 2020
@robmadole robmadole reopened this Sep 1, 2020
@robmadole robmadole changed the base branch from master to 3.x September 1, 2020 17:09
@robmadole
Copy link
Member

Hey, @rigma I'm prepped to merge this in but I introduced a couple of package lock conflicts. Do you think you can resolve those real quick? (The examples/vue-cli-webpack just needs to be deleted.) Otherwise if you don't have time I can open another PR and pull your commits over.

@robmadole robmadole mentioned this pull request Sep 1, 2020
@robmadole
Copy link
Member

@rigma porting this over to #249. I want to make sure I can get this released today!

@robmadole robmadole closed this Sep 1, 2020
@rigma
Copy link
Author

rigma commented Sep 1, 2020

No worries @robmadole! If you want me to do some changes, I can made it.

@robmadole
Copy link
Member

Nope, you've done plenty! Thank you again.

@robmadole robmadole mentioned this pull request Sep 1, 2020
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.

Vue 3 support
2 participants