Shoppers across the U.S. continued to spend more in April, marking the fourth consecutive month of growing retail spending across the economy. The jump in retail spending is happening against the backdrop of rising inflation.

On Tuesday, the Commerce Department published its recent data on retail spending and found that it grew at about 0.9% in April. This was slightly lower than the Dow Jones expectation of 1%, but the agency also revised the data from March to 1.4% growth compared to an original 0.5% estimate.

What drove the growth seen in April was a 4% jump in miscellaneous retail spending on top of a 2.1% increase in online sales. At the same time, April is the start of the spring season when more Americans are heading out for shopping and recreation, a fact partially reflected in the 2% increase in spending at bars and restaurants.

On the other hand, the number of gas receipts saw a dip. Spending at the pump sank by 2.7%. If gas-station spending was excluded, overall energy sales dropped by 1.3%.

Since Russia launched its war in Ukraine on Feb. 24, U.S. gas prices have risen precipitously and now stand at approximately $4.52 a barrel nationally, according to the American Automobile Association. In the most recent data for the Consumer Price Index (CPI), prices for energy products rose 30.3% in the last year alone.

Positive spending data comes despite rising inflation and an increasingly tightening stance from the Federal Reserve.

On May 11, the Labor Department estimated that CPI grew to 8.3% in April, a figure close to record levels of inflation last seen in August 1982. Prices for wholesale goods also experienced double-digit growth in April as inflation soared by 11%.

At the same time, the Fed adopted increasingly hawkish interest rate increases to tame inflation.

Earlier this month, the central bank initiated a half-percentage point rate hike in a bid to tamp down inflation and to gauge how markets would react.

The hike was the largest by the central bank in over 20 years as the Fed aims to avoid tipping the economy into a recession. Fed Chairman Jerome Powell acknowledged that the road ahead was filled with recessionary risks and that there were variables beyond the Fed's control.