DEV Community

loading...

Discussion on: The best way to learn React is.. to learn Angular?!

Collapse
omawhite profile image
Omar White

I actually tried to learn angular back in 2017 but couldn't wrap my head around it at first. Eventually I ended up on a team that was doing react and it all started to make sense.

You mention taking the services concept from angular and using it in react, i'm curious about that do you have any code examples you could point to?

Collapse
cadienvan profile image
Michael Di Prisco Author

Hi Omar, I'm sorry I can't as I'm answering from a PC without the source code, but simple enough, I just used the "http service rule" from Angular, which allows you to build services around HTTP Requests, and brought it inside utility files which I import and use whenever I need those. The concept of singletons, also, is widely popular and used in Angular and using it in React gives a lot of flexibility if you know how to deal with it.