> For the complete documentation index, see [llms.txt](https://gpeterhand.gitbook.io/react/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gpeterhand.gitbook.io/react/redux/podklyuchaemsya-k-store.md).

# Подключаемся к Store

Зададим начальное состояние для Store

{% code title="src/App/index.js" %}

```jsx
...
const store = createStore(
  connectRouter(history)(rootReducer), // new root reducer with router state
  { home: { text: 'Hello, world!' } }, // preloadedState
  composeEnhancers(
...  
```

{% endcode %}

Подключаемся к Store через connect() , берем из него данные и отображаем их

{% code title="src/scenes/Home/index.js" %}

```jsx
import { connect } from 'react-redux'

const Home = ({ text }) => (
  <>
    <h1>Home</h1>
    <p>{text}</p>
  </>
)

export default connect(({ home }) => ({ ...home }))(Home)
```

{% endcode %}

Теперь на странице Home должен появиться текст "Hello, world!"
