> For the complete documentation index, see [llms.txt](https://uby-rn.gitbook.io/react-native/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://uby-rn.gitbook.io/react-native/ders-3.0/state-yonetimi-and-redux-toolkit/store-olusturmak.md).

# Store Oluşturmak

Slice oluşturma işlemlerinden sonra bu fonksiyonları kullanmak için ulaşabileceğimiz bir yerde depolamamız lazım. Bunun için `store.js` adlı bir dosya oluşturalım.

```jsx
import { configureStore } from '@reduxjs/toolkit'
import CounterSlice from "./slices/CounterSlice";
import TrialSlice from "./slices/DenemeSlice";

export const store= configureStore({
    reducer: {
        counter: CounterSlice.reducer,
    },
})
```

`CounterSlice.js` dosyamızdan export ettiğimiz `reducers` fonksiyonlarımızı `CounterSlice.actions` şeklinde export etmiştik. Store dosyamızda ise configureStore objesinin içinde reducer fonksiyonlarımıza ulaşmak için slice dosyamızdaki reducer'ları ekliyoruz. Başka Slice dosyalarımız olsaydı onları da yukarıdaki gibi obje içine kaydedebilirdik.

Örneğin:&#x20;

```jsx
reducer: {
    counter: CounterSlice.reducer,
    user: UserSlice.reducer,
    media: MediaSlice.reducer
},
```

## Uygulamayı Sarmak

İndirme işlemlerimizi tamamladıktan sonra uygulamaya bir provider eklemek için `App.js` dosyamıza aşağıdaki gibi bir provider ekleyelim.

```jsx
import { StatusBar } from 'expo-status-bar';
import {Provider} from "react-redux";
import {store} from "./src/store/store";

function App() {
  return (
    <Provider store={store} > 
        {/* Uygulamanın geri kalanı */}
    </Provider>
  );
}

export default App
```

***

## Genel Yapı Hakkında

Eğer buraya kadar okuduysanız dallanıp budaklanan bir ağaç yapısı oluşturduğumuzu hayal edebilirsiniz. Store dosyamızda slice, slice dosyamızda da fonksiyonlarımız var.

<figure><img src="https://30791023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fticd3gejglRJIYeNG4Z2%2Fuploads%2FF1w0XpmZJMFaaJZKIdzu%2FStore%20Yap%C4%B1s%C4%B1.png?alt=media&amp;token=07d963e1-b5c2-489b-8dd7-2c2444c045b0" alt=""><figcaption><p>Store yapısı</p></figcaption></figure>

Benzer şekilde;

<figure><img src="https://30791023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fticd3gejglRJIYeNG4Z2%2Fuploads%2FGUQpnIdt1YK67IzuQUGX%2FStore%20Yap%C4%B1s%C4%B1-Ku%CC%88me.drawio.png?alt=media&amp;token=e7547d77-bafb-407d-b0f9-b2fd3d758091" alt=""><figcaption><p>store yapısı küme</p></figcaption></figure>
