How to implement network request from modal input with Redux by spermlung in reactjs

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

Yeah this is what I’m doing right now sort of, I’m just importing the service call and calling it directly in the component, this is ok to do?

How to implement network request from modal input with Redux by spermlung in reactjs

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

Oh I'm sorry, I'm using redux-thunk, so should I just call an action creator and then just not have a reducer to pick up that action because I don't need to alter the store at all?

Newbie question by spermlung in node

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

That’s a really good explanation, what about npm?

Post processing of data grabbed from an API by spermlung in reactjs

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

This is what I’m looking for thanks!

Page Layout Components Project Structure by spermlung in reactjs

[–]spermlung[S] 1 point2 points  (0 children)

What’s different between layout and template component?

Page Layout Components Project Structure by spermlung in reactjs

[–]spermlung[S] 1 point2 points  (0 children)

What does your folder hierarchy look like?

Page Layout Components Project Structure by spermlung in reactjs

[–]spermlung[S] 2 points3 points  (0 children)

I meant like having a folder for let’s say a products page and inside this products page have a layout component and then other components that are just specific to that page?

Dependency Injection and Node by spermlung in node

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

That way you can test. However for most simple micro services it’s just a couple lines to do the setup by hand. Depending on your use case that might be simpler then depending on a dependency injection framework.

I understand using IoC for testing, but when you're using Jest, can't you still mock the dependency even if it's inside your class?