-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add a simplified version of the dom elements #41
Add a simplified version of the dom elements #41
Conversation
import Unsafe.Coerce (unsafeCoerce) | ||
|
||
-- | Create a text node. | ||
text :: String -> JSX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This already exists, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but I couldn't just import it because this would result in a cyclic dependency. I think I could just move the unsafeCoerce into the typeclass anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@mjrussell can you have a look at this? |
Thanks for the ping, sorry this has lagged a bit. I think the overall proposal is good and it looks like a nice improvement. Definitely 👍 on a different module. Does this have any changes when moving to React 18? I was hoping to try to get #44 in first and then merge this |
This adds a simplified version of the dom elements (insipired by how
elmish-html
does it) to make it less boilerplatey to work with simple html elements. I added them in a separate module to avoid backwards-compatibility issues. Basically, this change allows you to write elements like this: