June 2022: If You Use React, Don't Miss the State of React Ecosystem Meetup July 14th
Plus see how to merge TypeScript objects with disparate properties and use Netflix's Eureka service registry to easily keep tabs on your microservices.
Hey all,
The summer weeks continue to move by quickly - next week it’ll already be a year since I joined the IoT startup Blues Wireless as a staff software engineer!
For your reading pleasure this month, I have two new blog posts, and an exciting event to share that I hope you’ll attend.
Join me on July 14th, 12 ET at the State of React Ecosystem meetup.
For the second year in a row, This Dot Labs is putting on a series of meetups this summer about all things tech.
In this particular meetup, we’ll be talking with the React Working Group, Library Authors and Maintainers, discussing the React Roadmap, Best Practices, Redux, Styling Libraries and techniques, Nextjs, and community initiatives!
I’ll be in the company of people continuing to make the React community better and better like Kent C. Dodds, Tanner Linsley, and Mark Erikson, among others.
It’s online, it’s free, it should be really fun. Sign up now so you don’t miss it.
Now on to the code!
Have you ever needed to combine objects in Typescript that share the same structure but have differently defined properties? It’s an interesting challenge I solved in this blog post.
Merging objects with JavaScript got a whole lot easier with methods like Object.assign() and the spread operator, but when there are multiple objects with different defined properties neither of these methods is good enough to keep the all the values from both.
Array.reduce(), however, can. With just a few extra functions, a list of objects that share keys can be reduced to single combined objects - and it even works with Typescript!
I’ll take you through the solution step-by-step so you can employ this same sort of thing the next time you find yourself in need.
If you use the mircoservices architecture for your web apps, you’ll want to know about the Netflix Eureka service registry - a more efficient way of keeping track of all the services making up an application.
One of the main tenets of the microservice architecture pattern is that a set of loosely-coupled, collaborating services works together to form a cohesive, whole application. It sounds like a good strategy, but keeping track of all the smaller pieces of the whole makes it a burden on the client to manage all of this.
That’s where Netflix’s Eureka service registry comes into play: without a lot of effort on our part, Eureka can locate those services for the purpose of load balancing and failover of middle-tier servers.
In this blog, I show you how to set up a Eureka service and then register both a Node.js and Java Spring Boot project with that service. It could come in handy if you, too, follow this architectural pattern.
I hope you enjoyed this month’s edition of “Paige Codes”. Please share with your friends if you did.
See you again at the end of July (and hopefully at the State of React Ecosystem meetup July 14th!),
- Paige