Reduce boilerplate to 6 lines for iOS with a Macro? #198
Closed
ConfusedVorlon
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
|
Thanks for sharing! I don't think this is something we will add to the library, though. Feel free to to use the macro on your own apps if you'd like. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
out of interest - why not? It seems like a nice way of abstracting away almost all of the implementation detail to focus on the required config. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, the boilerplate is pretty minimal for setup - but it's still a lot more than the actual params being provided.
A macro could easily generate the exact code in the docs from the declaration above.
(I'm assuming a default 'main' value for the Navigator name - with an option to specify a different name in the macro if required)
It puts a little bit of magic between the declaration, and assumes some convention over configuration for the local config location.
But the expansion is easily viewed, and easily replaced with manual code if someone wants to tweak things.
Implementation looks pretty straightforward. I have sketched it out - and would be happy to send a PR if there is interest...
Beta Was this translation helpful? Give feedback.
All reactions