Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

Demonstrate a macro for helping with building elements. #152

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

richard-uk1
Copy link

I'm not really advocating for merging this, rather I'm drawing your attention to its existence. I got bored of writing out the builder methods verbatim, so I made a macro to do codegen for me a la jsx. It can do some transformations for you, but you've always got a {} get-out, where tokens in the braces are just copied verbatim. It also uses a style lib I've been working on to typecheck css styles at compiletime.

Anyway as I said, just sharing in case it is interesting to anyone.

@richard-uk1
Copy link
Author

Any questions feel free to ask. :)

@fitzgen
Copy link
Owner

fitzgen commented May 8, 2020

Neat! This isn't really something I want to merge into dodrio itself, but I encourage tinkering with it as its own crate!

@fitzgen
Copy link
Owner

fitzgen commented May 8, 2020

Do you have an example of usage anywhere?

@richard-uk1
Copy link
Author

I am actually using this live in a production website (https://scrumbles.uk). Maybe not wise, but seems to be working well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants