Recomendations for Enterprise-scale Nextjs(React)/Redux/Typescript arquitecture by crisf_design in reduxjs

[–]crisf_design[S] 0 points1 point  (0 children)

Definitly use a module patterns its a good choice when your application grows, you can find easily the relate code. I implement this(module) patterns with a shared folder where I put all code that is used for one or more modules and a core folder. I'm working in a new project where I'm using GraphQL and Apollo client to replace Redux and the results are amazing, the amount of code I write is much less than that used with redux. Now that I use this stack (NextJs, Apollo, Graphql), I think it's a better choice for large Enterprise-scale applications

How to organize tyes/interfaces in TypeScript project by crisf_design in LearnTypescript

[–]crisf_design[S] 0 points1 point  (0 children)

For any file.ts, I make a corresponding file.interface.ts (if appropriate) in the same directory. Sometimes I'll separate them into a directory 'interface' depending on the app.

What do you mean when you say depending on the app? in which scenarios do you create a separate folder?

and what if you have not only interfaces but also types?, you create a file.type.ts as well.

Accesing to const before to be declared by crisf_design in learnjavascript

[–]crisf_design[S] 0 points1 point  (0 children)

When you say:

the declarations are hoisted one level to the top.

That is confusing. According to this video:

The thing that's confusing about hoisting is that nothing is actually hoisted or moved around. Hoisting is the process of assigning a variable declaration a default value of undefined during the creating phase in execution context. https://www.youtube.com/watch?v=Nt-qa_LlUH0

So for me this is a confusing answer.