La consola de AWS es ideal para aprender sobre la nube, pero para proyectos serios, debes llevar los conceptos a código.
La infraestructura como código (IaC) mejora la eficiencia y escalabilidad.
Descubre cómo en mi este sobre CloudFormation.
@awscloud
https://t.co/McrWHFmMSm
@kentcdodds I prefer `const` for primitive values because, other than not allowing to reassign them, typescript types will use the literal value instead of the data type. Will `let` will have to do a lot of `as const` to get similar results.
@phry@TkDodo@acemarke Absolutely, but in case we don't want to drill local state props down, zustand + context is a valid alternative to local state + context. Of course it's for some escenarios, in general prop drilling is ok.
@acemarke@TkDodo also, that way I could even mount the same Dashboard twice at the same time and it will work, it's not the case with a global store. (I like and use RTK, I am just mentioning one of the challenges I find)
@acemarke@TkDodo I just want to avoid prop drilling within a "component instance", like the dashboard example that Dominik mentioned in his blog post, it's not feasible with a global store. We have local state + context or a solution like that using zustand instances + cx:
https://t.co/N7zKCfBqkC
@acemarke I think it's the problem @TkDodo is trying to solve, it's not about getting a global store instance, but different instances for different component subtrees.
@acemarke I would like to use rtk within a component subtree, not always as a global state, it could simplify the logic in escenarios when I want a fresh state to share within a subtree. That will be initiated with default values when mounted and removed when unmounted like local state.
@TkDodo yes but it's global/shared for all the components, it would be nice if we could make it a separate instance for different component trees like what you shared about zustand + context
@TkDodo I totally agree, something I don't like about global state is that it's not tied to a component "lifecycle" like the local state, but sharing a zustand instance within a context makes a lot of sense. Thanks for sharing.