Open rajasegar opened 4 years ago
Thanks for the compliments. Love to hear, that you enjoyed reading it.
And yes, adding some explanation to the code to make it easier to to follow is a good idea. I had to walk a walk the fine line of keeping the examples brief, so that they don’t fill too much space, but at the same time I wanted them to be very explicit and not use to much boilerplate or clever tricks that make them hard to follow.
I would be glad to add your comments in the places that Ned more clarity.
Michael, first of all thanks a lot for putting up such a huge effort for the book and the examples here. They are greatly helpful to follow along the book. I am trying the examples one by one and made some observations on why you have written code in such a way by tweaking the code in many different ways and learning from it. Things such as :
In
14_client_side_two_level_routing
example in the app shell code here https://github.com/naltatis/micro-frontends-in-action-code/blob/31b23dc3d4b9cc8f8726b2b23f4c425d406eb567/14_client_side_two_level_routing/app-shell/index.html#L19 The order of the route entry mappings is important such that the resolving is happening properly by putting the / path as the last entry.In the same chapter, we need to set the
appHistory
instance in the window object so that they can be accessed outside in the respective team-* pages components https://github.com/naltatis/micro-frontends-in-action-code/blob/31b23dc3d4b9cc8f8726b2b23f4c425d406eb567/14_client_side_two_level_routing/app-shell/index.html#L46In the same chapter we can reuse the
template
function from the previous example in the following way instead of in-lining it. https://github.com/naltatis/micro-frontends-in-action-code/blob/31b23dc3d4b9cc8f8726b2b23f4c425d406eb567/14_client_side_two_level_routing/team-decide/pages.js#L19These things can be in the form of simple comments within the example code would be of great help. I can create PRs with these documentation comments if possible.
Once again, thanks a lot for the book, it is the goto-guide for micro frontends and I am enjoying each and every line of it, the sections
this chapter covers
,summary
, the graphics and the demo page are all phenomenal, and overall a great learning experience.