Instagram Story My Own Post

Posting On Facebook

how to schedule post on facebook personal account recurpost the ultimate guide to posting photo albums on facebook step by step 5 best practices when posting on facebook facebook post khung giờ vàng Đăng bài facebook tăng tương tác hiệu quả bùi mạnh Đức facebook posts how to post current location on facebook at rita skelley blog can we post job on facebook at martha ehrlich blog dịch vụ chạy quảng cáo facebook giá rẻ chuyển Đổi cao when really is the best time to post on facebook in 2026 how to add posts to featured section of a facebook page in 2025 how do i move a post to an album on facebook let s find out 如何在 facebook 上查找草稿帖子 0x資訊 create the perfect seamless carousel post on instagram planable how to post to multiple facebook groups 2022 it works youtube how to find draft posts on facebook youtube the best time to post on facebook in 2026 wordstream how to pin a post to top of facebook profile quick and easy youtube how to post facebook reels step by step zubtitle com taille des images sur tous les réseaux sociaux en 2025 how to unhide a post on facebook in 2022 vista social how to post on multiple facebook groups without getting banned group how to write killer headlines and copy for your facebook ads how to hide posts from friends on facebook youtube best times to post on facebook in 2023 amplitude marketing how to recover deleted facebook posts techcult 15 linkedin post ideas with inspiring examples and templates original size facebook timeline the original tangaliya made of how to change cover photo on facebook without posting youtube announcing a death on facebook with examples best resolution for posting photos on facebook at mark jeter blog how to bulk delete all facebook posts on a page in 2025 youtube how to edit facebook post fix no edit option on facebook post youtube facebook photos for tagging how to make new job post on facebook at erik darden blog announcing a death on facebook with examples welcome to our facebook group how to create a social media calendar like a pro sprinklr sprinklr how to make new job post on facebook at erik darden blog facebook post grid template figma 3d social media network illustration people face like online social media template banner travel and vacation service promotion dw travel the christmas market at gendarmenmarkt is one facebook merry christmas pictures facebook how to pin a comment on instagram easily best time to post on sunday for engagement interaction design org 50 times others caught stupid people on facebook and documented it deped community science math month sci math 2025 template casino banner design website banner design fb ads behance 50 times others caught stupid people on facebook and documented it khung giờ vàng đăng bài giúp đạt tương tác cao trên các nền tảng mạng meta s latest creator push comes with 3 000 bonuses for posting on how to pin a post on facebook banned but still posting facebook 8 best times and days to post on facebook in 2025 postiz happy easter day design with luxury golden eggs vector happy easter update on the kitty post facebook how to pin a post on facebook rare and on the road not as rare or a beautiful as some of the post how to post anonymously on facebook

:
Post -Increment Kids To Read
author
Ar11rA
committed
Update React Navigation with Redux
1 parent Add Reel-To Story commit 066d51e

How to schedule post on facebook personal account recurpost 1 file changed Casino banner design website banner design fb ads behance

Lines changed: 117 additions & 28 deletions

English Blog Students Posting On Facebook

10-navigation/10.2-integrating-with-redux-store.md

Lines changed: 117 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ While the integration is completely optional, we highly recommend doing this if
2525

2626
### How do you integrate react-navigation to the Redux store?
2727

28-
Integration with the Redux store is pretty easy. Let's continue with the integration in our NoteTaker app using __two__ simple steps.
28+
Integration with the Redux store is pretty easy. Let's continue with the integration in our NoteTaker app using __three__ simple steps.
2929

30-
1. In your reducer's index file, add the reducer using `getStateForAction` function.
30+
Run `npm install react-navigation-redux-helpers` or `yarn add react-navigation-redux-helpers`
31+
32+
1. In your reducer's index file, add the following:
3133

3234
> reducers/index.js
3335
@@ -36,40 +38,127 @@ Integration with the Redux store is pretty easy. Let's continue with the integra
3638
import test from './test.reducer';
3739
import Router from '../../routes';
3840

39-
const nav = (state, action) => (
40-
Router.router.getStateForAction(action, state) || state;
41-
);
42-
43-
export default combineReducers({
44-
test,
45-
nav
46-
});
41+
const router = Router.router;
42+
const homeNavAction = router.getActionForPathAndParams('home');
43+
const initialNavState = router.getStateForAction(homeNavAction);
4744

45+
const navReducer = (state = initialNavState, action) => {
46+
const nextState = router.getStateForAction(action, state);
47+
return nextState || state;
48+
};
4849
```
4950

50-
2. In your App.container.js file, where the Router component is being imported, pass navigation prop with dispatch and nav state.
51+
Now let's go through the code
5152

52-
The new app container file will look something like this:
53-
> App.container.js
53+
- `router.getActionForPathAndParams`: This function receives the key defined for a route in Navigator and params and returns an action which is needed to update the navigation state. In redux language, we need to call this action to navigate to a route.
5454

55-
```js
56-
class App extends Component {
57-
render () {
58-
const {dispatch, nav} = this.props;
59-
return (
60-
<Router navigation={addNavigationHelpers({dispatch, state: nav})}/>
61-
);
62-
}
55+
Output of this statement: `Object {type: "Navigation/NAVIGATE", routeName: "home", action: Object}`
56+
57+
This is the action that we get for the path 'home'. This becomes the initial route of our navigator.
58+
59+
- `router.getStateForAction(homeNavAction)`: : The above step gives us the action for navigating to the initial route, now we have to update the state of the Navigator to actually navigate to the route. So we pass the action and the current state of the navigator to getStateForAction and it returns the new updated state.
60+
61+
Output of this statement:
62+
63+
```bash
64+
Object {key: "StackRouterRoot", isTransitioning: false, index: 0, routes: Array(1)}
65+
index: 0
66+
isTransitioning: false
67+
key: "id-1522736064605-0"
68+
params: undefined
69+
routeName: "home"
70+
routes: Array(1) {
71+
0: Object
72+
key: "id-1522736173525-0"
73+
params: undefined
74+
routeName: "home"
75+
}
76+
```
77+
78+
79+
2. Add React Navigation Redux Middleware to store
80+
81+
```js
82+
import React, { Component } from 'react';
83+
import { Provider } from 'react-redux';
84+
import { createStore, applyMiddleware } from 'redux';
85+
import reducers from './reducers';
86+
import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers';
87+
88+
import RouterWithNavState from './routes';
89+
90+
const middleware = createReactNavigationReduxMiddleware(
91+
'root',
92+
state => state.nav,
93+
);
94+
95+
const store = createStore(reducers, {}, applyMiddleware(middleware));
96+
97+
export default class App extends Component {
98+
render() {
99+
return (
100+
<Provider store={store}>
101+
<RouterWithNavState />
102+
</Provider>
103+
);
104+
}
105+
}
106+
```
107+
108+
3. Modify main routes file as follows:
109+
110+
```js
111+
import React, { Component } from 'react';
112+
import { connect } from 'react-redux';
113+
import { StackNavigator, addNavigationHelpers } from 'react-navigation';
114+
import { createReduxBoundAddListener } from 'react-navigation-redux-helpers';
115+
import PropTypes from 'prop-types';
116+
117+
import AuthRoutes from './auth.routes';
118+
import Home from '../Components/Home';
119+
120+
export const Router = StackNavigator({
121+
home: {
122+
screen: Home,
123+
navigationOptions: {
124+
header: null
125+
}
126+
},
127+
auth: {
128+
screen: AuthRoutes,
129+
navigationOptions: {
130+
header: null
63131
}
132+
}
133+
});
64134

65-
const mapStateToProps = ({nav}) => ({
66-
nav
67-
});
135+
class RouterWithNavState extends Component {
68136

69-
const mapDispatchToProps = (dispatch) => ({
70-
dispatch
71-
});
72-
```
137+
render() {
138+
const addListener = createReduxBoundAddListener('root');
139+
const { dispatch, nav } = this.props;
140+
return (
141+
<Router
142+
navigation={addNavigationHelpers({ dispatch, state: nav, addListener })}
143+
/>
144+
);
145+
}
146+
}
147+
148+
149+
const mapStateToProps = (state) => {
150+
return ({
151+
nav: state.nav
152+
});
153+
};
154+
155+
RouterWithNavState.propTypes = {
156+
dispatch: PropTypes.func,
157+
nav: PropTypes.object
158+
};
159+
160+
export default connect(mapStateToProps)(RouterWithNavState);
161+
```
73162

74163
After the integration, you will be able to see the navigation state and actions inside your debugger's store.
75164

Products Image With Text Highlight Posting On Facebook

Comments
 (0)