While I was implementing the login feature, I was wondering what the best practice would be regarding where to store the JWT token.
There are two types of storage in web:
sessionStorage. These two allow saving key-value pairs within the browser (up to 5MB). …
While implementing a React app for this chat application, I ran into some problems setting up a proxy to call APIs provided by the backend. Most of the times adding a
package.json did the job for me. If this didn’t work out for me for some reason, then…
In this article, we are going to continue with client side of the chat application using React. If you are interested in the server implementation using Spring Reactive Stack, check out Part 1.
In the Part 1, we covered
Server-Sent Event (SSE), and overall flow of the application. …
In this article, we are going to implement a chat application using Spring WebFlux. By going with the Reactive Stack, we are going to use MongoDB since it offers reactive database capabilities like tailable cursors.
Normally when we query from a database, we end up with a
finite data stream…
Imagine a component which has the following code:
This sample will render a ‘Parent’ text and a ‘Child’ text like this:
How would the console output differ between clicking ‘Parent’ text versus ‘Child’ text? Let us analyze each output to learn about event propagation.
When doing Test-Driven Development with React, writing tests can be more difficult once the APIs and the HTTP calls are required.
When I first tried doing TDD, I tried to test everything using
jest.mock(). Jest was great for testing the behaviors but the test code became messy due to a…
When working with Kafka, testing can be a little bit tricky because there are many settings to be done in order to start testing. For example, Kafka broker needs to be running, the application needs to point to the correct broker, etc.
This article will cover how to unit test…
There are numerous cases where a service needs to make use of the APIs from other services.
On the provider side, it might be sufficient to write unit tests to verify that the endpoints provide the data with appropriate fields and data types. …
This article shows a few ways of writing unit tests to test drive the controller and service layers of a Reactive application.
Functional endpoints can be mapped by defining a
RouterFunction bean. Let us look at an example below which maps 4 endpoints. It can be observed that each endpoint…