-
Notifications
You must be signed in to change notification settings - Fork 187
React/Vue Typescript Hooks #422
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
base: 2.x
Are you sure you want to change the base?
Conversation
Converting to draft while we review. |
Hey @joetannenbaum, thanks for all the updates and Type improvement. I'll commit it to memory to never use In my latest commit, I've removed the exports for I've also reorganized a little bit so that the types and exports are grouped together in each file. You are right that the Composable does not need a I did want to ask if you think these files should be compiled from Thanks again! |
This PR will add React and Vue typescript hooks. This will make make it easier to work with Echo using the React/Vue Starter Kit or any other application that utilizes React/Vue with Typescript.
To use within a React application, you'll import and use like so:
This will also function the same way for Vue applications except that you will import
laravel-echo/vue
:Configuring
When you install echo via the
install:broadcast
command the echo config will automatically be injected into theapp.tsx
orapp.ts
file, like so:This PR should go hand in hand with this PR, which will add the correct echo configuration during the
install:broadcast
command.