Hacker News new | past | comments | ask | show | jobs | submit login

I'm really appreciative of the mention of the inverted import.

Inverting the flow really lets components "register" themselves and thus be fully contained rather than be "required" by another component. It can be powerful but it causes the problem that you never really know what all is registered to another component.

Also, yeah, code-splitting isn't easy!




Reminds me a lot of the League Client architecture that Riot wrote about:

https://engineering.riotgames.com/news/under-hood-league-cli...

Every component of the client is independently built, tested, versioned, and registers itself with the main process on startup.

I think didn't grok the nature of "register" vs "require" and the subtle implications of containment vs requirement until now.


A simple way to look at this is when you build the application it’ll be from the top down, but when people have to maintain it, they work from the bottom up. You shouldn’t have to know that there is a central registry for a file to work on a file, it should be clear by reading the file.


I have a talk about these ideas in the Context of a React Application last year at React.js Conf - https://youtu.be/395ou6k6C6k. It might be worth a watch if you’re interested in how to build applications like this on your own.


Does anyone knows if this can be done in Vue.js?


thanks! I appreciate it! :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: