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

Use functions from standard library #57

Open
suzumiyasmith opened this issue Feb 2, 2020 · 0 comments
Open

Use functions from standard library #57

suzumiyasmith opened this issue Feb 2, 2020 · 0 comments

Comments

@suzumiyasmith
Copy link
Contributor

Problem: Those two functions exist in de facto library

appendChildNode :: Element -> Array Node -> Effect Unit

getElementById :: String -> Effect Element

Solution: Import from standard library

https://pursuit.purescript.org/packages/purescript-web-dom/4.0.0/docs/Web.DOM.Node#v:appendChild

https://pursuit.purescript.org/packages/purescript-web-dom/4.0.0/docs/Web.DOM.NonElementParentNode#v:getElementById

Example Usage:

https://github.com/purescript-concur/purescript-concur-react/blob/720879aba03c0cdfaad0d813d7b0fb5f32e8d614/src/Concur/React/Run.purs#L16-L16

Additional context
❤oak

@suzumiyasmith suzumiyasmith changed the title Using functions from standard library Use functions from standard library Feb 2, 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

No branches or pull requests

1 participant