---
title: "Breaking the Re-render Chain: Our Migration from Context to Zustand"
url: https://daily.dev/posts/breaking-the-re-render-chain-our-migration-from-context-to-zustand-iens0uzws
source_url: https://medium.com/trendyol-tech/breaking-the-re-render-chain-our-migration-from-context-to-zustand-76d4998806d2
type: article
source: "Trendyol Tech"
author: "Okan DAVUT"
published: 2026-02-26T06:53:17.099Z
updated: 2026-03-15T06:05:38.015Z
tags: ["performance", "react", "zustand"]
reading_time: 9
upvotes: 63
comments: 1
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Breaking the Re-render Chain: Our Migration from Context to Zustand

**[Trendyol Tech](https://daily.dev/sources/trendyoltech)** · [@okan](https://daily.dev/okan) · 9 min read · 63 upvotes · 1 comments

## Summary

The Trendyol Affiliate Ads team migrated from React Context API to Zustand after hitting performance ceilings caused by cascading re-renders and lack of granular subscriptions. Their complex Ads Editor was generating 8,000+ function calls per interaction, causing visible UI lag. They adopted a feature-based store architecture with 7 independent Zustand stores for the create flow, using Immer for nested state updates and named DevTools instances for debuggability. The incremental, feature-by-feature migration avoided production risk. Results included a ~20% average reduction in interaction latency (31% in the most complex scenario), 80%+ reduction in Cumulative Layout Shift, 28% fewer UpdateLayoutTree recalculations, and a 60% drop in developer onboarding time. Key lessons: granular selectors are the primary performance driver, scoped stores beat a single global store, and the real bottleneck was React doing unnecessary work rather than slow JavaScript execution.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/trendyol-tech/breaking-the-re-render-chain-our-migration-from-context-to-zustand-76d4998806d2>

## Community discussion

Top comments from developers on daily.dev.

**@seyoungcho** · 3 upvotes

> Zustand has always been my favorite client side state management library

---

Tags: [#performance](https://daily.dev/tags/performance), [#react](https://daily.dev/tags/react), [#zustand](https://daily.dev/tags/zustand)

[View this post on daily.dev](https://daily.dev/posts/breaking-the-re-render-chain-our-migration-from-context-to-zustand-iens0uzws)
