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

adds id as option to useScript hook #285

Closed

Conversation

misidoro
Copy link

@misidoro misidoro commented Jan 26, 2023

I am currently using useScript to download zendesk script but an id is required to make it work. It's working on the project as I copied the whole hook and added the id but I think it would be a good addiction.

Currently using it as

const status = useScript("https://static.zdassets.com/ekr/snippet.js?key=8f60d464-1c48-48a6-8d14-25f47c389e59", {
    id: "ze-snippet"
});

In order to get the project running I had to install a bunch of eslint dependencies. Not sure if I am doing something wrong.

I was not able to get the docs running, might be due to some setup missing.

@juliencrn
Copy link
Owner

Hey @misidoro,
Great add! Thank you. I moved your work there (#525) because this PR is too old and the code moved since.
I added you to the contributor list.

@juliencrn juliencrn closed this Mar 5, 2024
juliencrn added a commit that referenced this pull request Mar 5, 2024
* ✨ Add `id` param to `useScript` hook (from #285 by @misidoro)

* Fix missing useEffect dependency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants