-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Proposal: Generic launch example #198
Comments
Yes I like it. So if I'm reading it right, the idea would be to launch from the main method, and that essentially does the above? (+ flags in the dataset) Have I got that right? One of the common questions I get quite often is "why can't I just use the main method?" and the answer is of course that you can! ...but we don't have many examples, nor is there a good built in solution for that. |
Yep, I'm currently launching this from the main method. It looks like if the bundle is loaded as a regular script vs module it has to wait for DOMContentLoaded so I also have some handling for that. I could create a PR with an example in the examples folder? |
Hi @stevechy - I was wondering about baking it into the main launcher, here somewhere: Although I confess that at the moment I don't know exactly what that would look like! If you felt like having a go, you could either work on the main launcher, or add an example - as you suggested - that we could use as the basis for the launcher version later (that I could help with). It would be great to have either contributed if you have the time, no pressure. 😄 |
…an-app container elements PurpleKingdomGames#198 : Fix flag replacement
Ok, I created #200 I guess I should have made it a draft. |
Having multiple apps probably doesn't fit with the Elm Architecture but I find it useful to get things up and running.
|
…an-app container elements
… TyrianApp companion objects.
… TyrianApp companion objects.
…ap. Update flag data-attr to data-tyrian-flag. Fixed the types to IO and ZIO in tyrian-io and tyrian-zio.
* #198 : Add a launch method that scans for data-tyrian-app container elements * #198 : Add main-launcher example * #198 : Update launch method name and signature. Add TyrianApp companion objects. * #198 : Change TyrianAppF to take both varargs and Map. Update flag data-attr to data-tyrian-flag. Fixed the types to IO and ZIO in tyrian-io and tyrian-zio.
The PR has been merged and this feature will be in the next release - thanks for all the work @stevechy! 😄 |
That's great! Looking forward to using this instead of the messy version in my current project 😄 |
I was trying out Tyrian and wrote a simple launcher based on how react-rails mounts elements.
There's some extra Promise wrapping around it but the basic idea is.
Flags could also be read from the dataset
Does this seem useful?
The text was updated successfully, but these errors were encountered: