Hi Peter, If I understand correctly, a box is basically a mini-main. And boxes can be composed into one big main. I like the resulting code, like:
main : Html msg main = div [] [ counter [ value 4 ] [] , counter [ value 2 ] [] ] The result is a very easy composable main. Questions that come to mind are: - Theme-ability: can components adhere to a general CSS theme? - And I did not see an example where information from one component is used in another. How would that look like? Can a box store information in a model in main, for example? I imagine a form box that gathers information from a user (including validation, etc.) and if form is valid the information is stored in the model in main. And some other component uses this information to show the data. - Can boxes exist within boxes? PS: the example runs in chrome. But, in Safari I get the following error: <https://lh3.googleusercontent.com/-oxizEJbceQI/WINwu9DCBAI/AAAAAAAABCY/ovok9cWfFVoSqRTW7DZK4rUetsGVndVkwCLcB/s1600/Screen%2BShot%2B2017-01-21%2Bat%2B11.42.12.png> Which is line 162 in box.js. Thanks! Berry Op zaterdag 21 januari 2017 10:43:09 UTC+1 schreef Peter Damoc: > > Hello Community, > > I've worked the last few days to bring about an older dream of mine: > converting Elm programs into Html elements with the intention of composing > them. > > The route I took was that of the pseudo Web Components. > > Here is the library that I made: > https://github.com/pdamoc/elm-box > > It is implemented with Native so, don't expect to see it in the packages > repository any time soon but I think this is an important topic and should > be explored by more people. > > The Readme has instructions for both playing with it and for testing it in > toy projects. > > The examples folder has a bunch of examples showing how I view implemented > the old elm-architecture-tutorial examples using Boxes. > > The examples range from extremely simple to a more fancy example that > integrates with elm-css. > > The API has passed through a few iterations and I think it is quite OK but > if you have suggestions for improvements please contribute. > > There are, of course, a lot issues and caveats due to this being a quick > and dirty implementation BUT, it think the code is good enough to be used > to start this discussion. > > This is a very dear topic to me so, any questions or comments are > appreciated. > > Thank you. > > -- > There is NO FATE, we are the creators. > blog: http://damoc.ro/ > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.