-
Notifications
You must be signed in to change notification settings - Fork 133
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
Vue 3 support #246
Conversation
docs: add a note on a missing assertion in a test case
chore: updating typescript typings
Amazing! Thanks @rigma. I will have some time in the next couple of weeks to look over this and move it forward. |
Alright, I'm focusing on this today. I expect to have an pre-release candidate out today from your work @rigma |
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. |
No worries @robmadole! If you want me to do some changes, I can made it. |
Nope, you've done plenty! Thank you again. |
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 ofrender()
functionsIn Vue 3, render functions will no longer receives arguments. As a result, it can no longer access to
props
orslots
and theh
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 withsetup()
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