Saltar al contenido principal

Refactor the pricing rule without hiding state

Choose a refactor that isolates pure pricing logic from effectful checkout code.

functional-programming5 min read

You need to fix a checkout pricing helper that reads hidden context and mutates the cart. The team wants a refactor that will make the next pricing bug easy to reproduce.

Read the full lesson

Sign up free: one personalized lesson every day, matched to your role and goals.

← Back to library

Contáctanos