React with Redux, component unable to recognize a property passed from a parent











up vote
0
down vote

favorite












Kindly go over the code below, if its not clear enough, Here is a codesandbox for an extended version of my issue,



so I am passing some properties from a parent to a child comp., the parent is my <Main /> comp., which is wrapped in a <Provider> comp. to allow it to access the store. Now, in the child, I have a function that renders info based on the passed props from the parent, here is my child comp. code






//Home Component
...
const RenderCard = ({item, isLoading, errMess}) => {
console.log(item.name)

if(isLoading) {
return(
<Loading />
)
}
else if (errMess) {
return (
<h4>{errMess}</h4>
)
}
else {
return(
<h1>{item.name}</h1>
)
}
}

const Home = props => {
return (
<RenderCard item={props.dish} isLoading={props.dishesLoading} errMess={props.dishesErrMess} />
)
}

...





Here is how I pass the prop from the parent,






const mapStateToProps = state => {
return {
dishes: state.dishes,
comments: state.comments,
leaders: state.leaders,
promotions: state.promotions
}
}

const mapDispatchToProps = dispatch => ({
addComment: (dishId, rating, author, comment) => dispatch(addComment(dishId, rating, author, comment)),
fetchDishes: () => {
dispatch(fetchDishes())
}
})

class Main extends Component {
constructor(props) {
super(props)
}

componentDidMount() {
this.props.fetchDishes()
console.log(this.props.dishes.dishes.filter(dish => dish.featured)[0])
}

render() {
const HomePage = () => {
<Home dish = {this.props.dishes.dishes.filter(dish => dish.featured)[0]} />
}
}
}

export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Main));





the strange part is, in the first code snippet, line 4, the console.log(..) msg, successfully logs the desired info to the console, which means the props are passed and reached to the <RenderCard /> comp. However, instead of rendering it on the window, I get a TypeError Cannot read property name of undefined.



please leave a comment below if any further parts of the code are needed.



thanks in advance.










share|improve this question






















  • About style: You don't need return statement after arrow if you only return something, it don't help reading. Use prop-types library and catch place where first you get wrong type of item. Use unit tests like jest - it's really easy to use it and you don't waste time on such questions.
    – Zydnar
    Nov 19 at 11:30












  • If you don't want to use prop-types library use at least js docs for better IDE support.
    – Zydnar
    Nov 19 at 11:32










  • thanks for your comment, But I am only using the return when conditionally rendering something based on the props passed from the parent. regarding the jest testing, well, I need to get this problem solved for now and then I will consider looking into unit testing
    – MoSwilam
    Nov 19 at 11:50















up vote
0
down vote

favorite












Kindly go over the code below, if its not clear enough, Here is a codesandbox for an extended version of my issue,



so I am passing some properties from a parent to a child comp., the parent is my <Main /> comp., which is wrapped in a <Provider> comp. to allow it to access the store. Now, in the child, I have a function that renders info based on the passed props from the parent, here is my child comp. code






//Home Component
...
const RenderCard = ({item, isLoading, errMess}) => {
console.log(item.name)

if(isLoading) {
return(
<Loading />
)
}
else if (errMess) {
return (
<h4>{errMess}</h4>
)
}
else {
return(
<h1>{item.name}</h1>
)
}
}

const Home = props => {
return (
<RenderCard item={props.dish} isLoading={props.dishesLoading} errMess={props.dishesErrMess} />
)
}

...





Here is how I pass the prop from the parent,






const mapStateToProps = state => {
return {
dishes: state.dishes,
comments: state.comments,
leaders: state.leaders,
promotions: state.promotions
}
}

const mapDispatchToProps = dispatch => ({
addComment: (dishId, rating, author, comment) => dispatch(addComment(dishId, rating, author, comment)),
fetchDishes: () => {
dispatch(fetchDishes())
}
})

class Main extends Component {
constructor(props) {
super(props)
}

componentDidMount() {
this.props.fetchDishes()
console.log(this.props.dishes.dishes.filter(dish => dish.featured)[0])
}

render() {
const HomePage = () => {
<Home dish = {this.props.dishes.dishes.filter(dish => dish.featured)[0]} />
}
}
}

export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Main));





the strange part is, in the first code snippet, line 4, the console.log(..) msg, successfully logs the desired info to the console, which means the props are passed and reached to the <RenderCard /> comp. However, instead of rendering it on the window, I get a TypeError Cannot read property name of undefined.



please leave a comment below if any further parts of the code are needed.



thanks in advance.










share|improve this question






















  • About style: You don't need return statement after arrow if you only return something, it don't help reading. Use prop-types library and catch place where first you get wrong type of item. Use unit tests like jest - it's really easy to use it and you don't waste time on such questions.
    – Zydnar
    Nov 19 at 11:30












  • If you don't want to use prop-types library use at least js docs for better IDE support.
    – Zydnar
    Nov 19 at 11:32










  • thanks for your comment, But I am only using the return when conditionally rendering something based on the props passed from the parent. regarding the jest testing, well, I need to get this problem solved for now and then I will consider looking into unit testing
    – MoSwilam
    Nov 19 at 11:50













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Kindly go over the code below, if its not clear enough, Here is a codesandbox for an extended version of my issue,



so I am passing some properties from a parent to a child comp., the parent is my <Main /> comp., which is wrapped in a <Provider> comp. to allow it to access the store. Now, in the child, I have a function that renders info based on the passed props from the parent, here is my child comp. code






//Home Component
...
const RenderCard = ({item, isLoading, errMess}) => {
console.log(item.name)

if(isLoading) {
return(
<Loading />
)
}
else if (errMess) {
return (
<h4>{errMess}</h4>
)
}
else {
return(
<h1>{item.name}</h1>
)
}
}

const Home = props => {
return (
<RenderCard item={props.dish} isLoading={props.dishesLoading} errMess={props.dishesErrMess} />
)
}

...





Here is how I pass the prop from the parent,






const mapStateToProps = state => {
return {
dishes: state.dishes,
comments: state.comments,
leaders: state.leaders,
promotions: state.promotions
}
}

const mapDispatchToProps = dispatch => ({
addComment: (dishId, rating, author, comment) => dispatch(addComment(dishId, rating, author, comment)),
fetchDishes: () => {
dispatch(fetchDishes())
}
})

class Main extends Component {
constructor(props) {
super(props)
}

componentDidMount() {
this.props.fetchDishes()
console.log(this.props.dishes.dishes.filter(dish => dish.featured)[0])
}

render() {
const HomePage = () => {
<Home dish = {this.props.dishes.dishes.filter(dish => dish.featured)[0]} />
}
}
}

export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Main));





the strange part is, in the first code snippet, line 4, the console.log(..) msg, successfully logs the desired info to the console, which means the props are passed and reached to the <RenderCard /> comp. However, instead of rendering it on the window, I get a TypeError Cannot read property name of undefined.



please leave a comment below if any further parts of the code are needed.



thanks in advance.










share|improve this question













Kindly go over the code below, if its not clear enough, Here is a codesandbox for an extended version of my issue,



so I am passing some properties from a parent to a child comp., the parent is my <Main /> comp., which is wrapped in a <Provider> comp. to allow it to access the store. Now, in the child, I have a function that renders info based on the passed props from the parent, here is my child comp. code






//Home Component
...
const RenderCard = ({item, isLoading, errMess}) => {
console.log(item.name)

if(isLoading) {
return(
<Loading />
)
}
else if (errMess) {
return (
<h4>{errMess}</h4>
)
}
else {
return(
<h1>{item.name}</h1>
)
}
}

const Home = props => {
return (
<RenderCard item={props.dish} isLoading={props.dishesLoading} errMess={props.dishesErrMess} />
)
}

...





Here is how I pass the prop from the parent,






const mapStateToProps = state => {
return {
dishes: state.dishes,
comments: state.comments,
leaders: state.leaders,
promotions: state.promotions
}
}

const mapDispatchToProps = dispatch => ({
addComment: (dishId, rating, author, comment) => dispatch(addComment(dishId, rating, author, comment)),
fetchDishes: () => {
dispatch(fetchDishes())
}
})

class Main extends Component {
constructor(props) {
super(props)
}

componentDidMount() {
this.props.fetchDishes()
console.log(this.props.dishes.dishes.filter(dish => dish.featured)[0])
}

render() {
const HomePage = () => {
<Home dish = {this.props.dishes.dishes.filter(dish => dish.featured)[0]} />
}
}
}

export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Main));





the strange part is, in the first code snippet, line 4, the console.log(..) msg, successfully logs the desired info to the console, which means the props are passed and reached to the <RenderCard /> comp. However, instead of rendering it on the window, I get a TypeError Cannot read property name of undefined.



please leave a comment below if any further parts of the code are needed.



thanks in advance.






//Home Component
...
const RenderCard = ({item, isLoading, errMess}) => {
console.log(item.name)

if(isLoading) {
return(
<Loading />
)
}
else if (errMess) {
return (
<h4>{errMess}</h4>
)
}
else {
return(
<h1>{item.name}</h1>
)
}
}

const Home = props => {
return (
<RenderCard item={props.dish} isLoading={props.dishesLoading} errMess={props.dishesErrMess} />
)
}

...





//Home Component
...
const RenderCard = ({item, isLoading, errMess}) => {
console.log(item.name)

if(isLoading) {
return(
<Loading />
)
}
else if (errMess) {
return (
<h4>{errMess}</h4>
)
}
else {
return(
<h1>{item.name}</h1>
)
}
}

const Home = props => {
return (
<RenderCard item={props.dish} isLoading={props.dishesLoading} errMess={props.dishesErrMess} />
)
}

...





const mapStateToProps = state => {
return {
dishes: state.dishes,
comments: state.comments,
leaders: state.leaders,
promotions: state.promotions
}
}

const mapDispatchToProps = dispatch => ({
addComment: (dishId, rating, author, comment) => dispatch(addComment(dishId, rating, author, comment)),
fetchDishes: () => {
dispatch(fetchDishes())
}
})

class Main extends Component {
constructor(props) {
super(props)
}

componentDidMount() {
this.props.fetchDishes()
console.log(this.props.dishes.dishes.filter(dish => dish.featured)[0])
}

render() {
const HomePage = () => {
<Home dish = {this.props.dishes.dishes.filter(dish => dish.featured)[0]} />
}
}
}

export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Main));





const mapStateToProps = state => {
return {
dishes: state.dishes,
comments: state.comments,
leaders: state.leaders,
promotions: state.promotions
}
}

const mapDispatchToProps = dispatch => ({
addComment: (dishId, rating, author, comment) => dispatch(addComment(dishId, rating, author, comment)),
fetchDishes: () => {
dispatch(fetchDishes())
}
})

class Main extends Component {
constructor(props) {
super(props)
}

componentDidMount() {
this.props.fetchDishes()
console.log(this.props.dishes.dishes.filter(dish => dish.featured)[0])
}

render() {
const HomePage = () => {
<Home dish = {this.props.dishes.dishes.filter(dish => dish.featured)[0]} />
}
}
}

export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Main));






javascript reactjs redux react-redux






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 at 11:15









MoSwilam

418




418












  • About style: You don't need return statement after arrow if you only return something, it don't help reading. Use prop-types library and catch place where first you get wrong type of item. Use unit tests like jest - it's really easy to use it and you don't waste time on such questions.
    – Zydnar
    Nov 19 at 11:30












  • If you don't want to use prop-types library use at least js docs for better IDE support.
    – Zydnar
    Nov 19 at 11:32










  • thanks for your comment, But I am only using the return when conditionally rendering something based on the props passed from the parent. regarding the jest testing, well, I need to get this problem solved for now and then I will consider looking into unit testing
    – MoSwilam
    Nov 19 at 11:50


















  • About style: You don't need return statement after arrow if you only return something, it don't help reading. Use prop-types library and catch place where first you get wrong type of item. Use unit tests like jest - it's really easy to use it and you don't waste time on such questions.
    – Zydnar
    Nov 19 at 11:30












  • If you don't want to use prop-types library use at least js docs for better IDE support.
    – Zydnar
    Nov 19 at 11:32










  • thanks for your comment, But I am only using the return when conditionally rendering something based on the props passed from the parent. regarding the jest testing, well, I need to get this problem solved for now and then I will consider looking into unit testing
    – MoSwilam
    Nov 19 at 11:50
















About style: You don't need return statement after arrow if you only return something, it don't help reading. Use prop-types library and catch place where first you get wrong type of item. Use unit tests like jest - it's really easy to use it and you don't waste time on such questions.
– Zydnar
Nov 19 at 11:30






About style: You don't need return statement after arrow if you only return something, it don't help reading. Use prop-types library and catch place where first you get wrong type of item. Use unit tests like jest - it's really easy to use it and you don't waste time on such questions.
– Zydnar
Nov 19 at 11:30














If you don't want to use prop-types library use at least js docs for better IDE support.
– Zydnar
Nov 19 at 11:32




If you don't want to use prop-types library use at least js docs for better IDE support.
– Zydnar
Nov 19 at 11:32












thanks for your comment, But I am only using the return when conditionally rendering something based on the props passed from the parent. regarding the jest testing, well, I need to get this problem solved for now and then I will consider looking into unit testing
– MoSwilam
Nov 19 at 11:50




thanks for your comment, But I am only using the return when conditionally rendering something based on the props passed from the parent. regarding the jest testing, well, I need to get this problem solved for now and then I will consider looking into unit testing
– MoSwilam
Nov 19 at 11:50












2 Answers
2






active

oldest

votes

















up vote
2
down vote













PRoblem is that in your main component you are passing the dishesLoading prop to the Home component incorrectly. You need to access it from props with the name isLoading and not dishesLoading



const HomePage = () => {
return (
<Home
dish={this.props.dishes.dishes.filter(dish => dish.featured)[0]}
dishesLoading={this.props.dishes.isLoading}
dishesErrMess={this.props.dishes.errMess}
/>
);
};


Working sandbox



Also in the RenderCard component you shouldn't access item.name before the data is loaded since initially its undefined in console.log(item.name)






share|improve this answer





















  • thanks very much, its working now, thanks again for your time :)
    – MoSwilam
    Nov 19 at 12:06










  • Glad to have helped
    – Shubham Khatri
    Nov 19 at 12:17


















up vote
2
down vote













Problem is, that you're not returning any component in your Main component's render method. You've declared a method HomePage instead.



Refer the code below. This should work.



UPDATE:



Here's the sandbox that works: https://codesandbox.io/s/8nopnq3jo0



You were trying to render before the dishes loaded. Hence, added a condition check if the dishes were loaded or not.



function Home(props) {
return (
!props.dishesLoading && (
<div className="container">
<div className="row align-items-start">
<div className="col-12 col-md m-1">
<RenderCard
item={props.dish}
isLoading={props.dishesLoading}
errMess={props.dishesErrMess}
/>
</div>
</div>
</div>
)
);
}





share|improve this answer























  • could you please recheck the codesandbox, I initially forgot to add the <Redirect> to the <switch>, now its added since I am using the router to render the home if no routes are selected. thanks
    – MoSwilam
    Nov 19 at 11:48










  • Updated my answer
    – Vishal Sharma
    Nov 19 at 12:04










  • thanks very much Vishal, Problem solved brother :)
    – MoSwilam
    Nov 19 at 12:07











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373449%2freact-with-redux-component-unable-to-recognize-a-property-passed-from-a-parent%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote













PRoblem is that in your main component you are passing the dishesLoading prop to the Home component incorrectly. You need to access it from props with the name isLoading and not dishesLoading



const HomePage = () => {
return (
<Home
dish={this.props.dishes.dishes.filter(dish => dish.featured)[0]}
dishesLoading={this.props.dishes.isLoading}
dishesErrMess={this.props.dishes.errMess}
/>
);
};


Working sandbox



Also in the RenderCard component you shouldn't access item.name before the data is loaded since initially its undefined in console.log(item.name)






share|improve this answer





















  • thanks very much, its working now, thanks again for your time :)
    – MoSwilam
    Nov 19 at 12:06










  • Glad to have helped
    – Shubham Khatri
    Nov 19 at 12:17















up vote
2
down vote













PRoblem is that in your main component you are passing the dishesLoading prop to the Home component incorrectly. You need to access it from props with the name isLoading and not dishesLoading



const HomePage = () => {
return (
<Home
dish={this.props.dishes.dishes.filter(dish => dish.featured)[0]}
dishesLoading={this.props.dishes.isLoading}
dishesErrMess={this.props.dishes.errMess}
/>
);
};


Working sandbox



Also in the RenderCard component you shouldn't access item.name before the data is loaded since initially its undefined in console.log(item.name)






share|improve this answer





















  • thanks very much, its working now, thanks again for your time :)
    – MoSwilam
    Nov 19 at 12:06










  • Glad to have helped
    – Shubham Khatri
    Nov 19 at 12:17













up vote
2
down vote










up vote
2
down vote









PRoblem is that in your main component you are passing the dishesLoading prop to the Home component incorrectly. You need to access it from props with the name isLoading and not dishesLoading



const HomePage = () => {
return (
<Home
dish={this.props.dishes.dishes.filter(dish => dish.featured)[0]}
dishesLoading={this.props.dishes.isLoading}
dishesErrMess={this.props.dishes.errMess}
/>
);
};


Working sandbox



Also in the RenderCard component you shouldn't access item.name before the data is loaded since initially its undefined in console.log(item.name)






share|improve this answer












PRoblem is that in your main component you are passing the dishesLoading prop to the Home component incorrectly. You need to access it from props with the name isLoading and not dishesLoading



const HomePage = () => {
return (
<Home
dish={this.props.dishes.dishes.filter(dish => dish.featured)[0]}
dishesLoading={this.props.dishes.isLoading}
dishesErrMess={this.props.dishes.errMess}
/>
);
};


Working sandbox



Also in the RenderCard component you shouldn't access item.name before the data is loaded since initially its undefined in console.log(item.name)







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 19 at 11:50









Shubham Khatri

74.6k1384123




74.6k1384123












  • thanks very much, its working now, thanks again for your time :)
    – MoSwilam
    Nov 19 at 12:06










  • Glad to have helped
    – Shubham Khatri
    Nov 19 at 12:17


















  • thanks very much, its working now, thanks again for your time :)
    – MoSwilam
    Nov 19 at 12:06










  • Glad to have helped
    – Shubham Khatri
    Nov 19 at 12:17
















thanks very much, its working now, thanks again for your time :)
– MoSwilam
Nov 19 at 12:06




thanks very much, its working now, thanks again for your time :)
– MoSwilam
Nov 19 at 12:06












Glad to have helped
– Shubham Khatri
Nov 19 at 12:17




Glad to have helped
– Shubham Khatri
Nov 19 at 12:17












up vote
2
down vote













Problem is, that you're not returning any component in your Main component's render method. You've declared a method HomePage instead.



Refer the code below. This should work.



UPDATE:



Here's the sandbox that works: https://codesandbox.io/s/8nopnq3jo0



You were trying to render before the dishes loaded. Hence, added a condition check if the dishes were loaded or not.



function Home(props) {
return (
!props.dishesLoading && (
<div className="container">
<div className="row align-items-start">
<div className="col-12 col-md m-1">
<RenderCard
item={props.dish}
isLoading={props.dishesLoading}
errMess={props.dishesErrMess}
/>
</div>
</div>
</div>
)
);
}





share|improve this answer























  • could you please recheck the codesandbox, I initially forgot to add the <Redirect> to the <switch>, now its added since I am using the router to render the home if no routes are selected. thanks
    – MoSwilam
    Nov 19 at 11:48










  • Updated my answer
    – Vishal Sharma
    Nov 19 at 12:04










  • thanks very much Vishal, Problem solved brother :)
    – MoSwilam
    Nov 19 at 12:07















up vote
2
down vote













Problem is, that you're not returning any component in your Main component's render method. You've declared a method HomePage instead.



Refer the code below. This should work.



UPDATE:



Here's the sandbox that works: https://codesandbox.io/s/8nopnq3jo0



You were trying to render before the dishes loaded. Hence, added a condition check if the dishes were loaded or not.



function Home(props) {
return (
!props.dishesLoading && (
<div className="container">
<div className="row align-items-start">
<div className="col-12 col-md m-1">
<RenderCard
item={props.dish}
isLoading={props.dishesLoading}
errMess={props.dishesErrMess}
/>
</div>
</div>
</div>
)
);
}





share|improve this answer























  • could you please recheck the codesandbox, I initially forgot to add the <Redirect> to the <switch>, now its added since I am using the router to render the home if no routes are selected. thanks
    – MoSwilam
    Nov 19 at 11:48










  • Updated my answer
    – Vishal Sharma
    Nov 19 at 12:04










  • thanks very much Vishal, Problem solved brother :)
    – MoSwilam
    Nov 19 at 12:07













up vote
2
down vote










up vote
2
down vote









Problem is, that you're not returning any component in your Main component's render method. You've declared a method HomePage instead.



Refer the code below. This should work.



UPDATE:



Here's the sandbox that works: https://codesandbox.io/s/8nopnq3jo0



You were trying to render before the dishes loaded. Hence, added a condition check if the dishes were loaded or not.



function Home(props) {
return (
!props.dishesLoading && (
<div className="container">
<div className="row align-items-start">
<div className="col-12 col-md m-1">
<RenderCard
item={props.dish}
isLoading={props.dishesLoading}
errMess={props.dishesErrMess}
/>
</div>
</div>
</div>
)
);
}





share|improve this answer














Problem is, that you're not returning any component in your Main component's render method. You've declared a method HomePage instead.



Refer the code below. This should work.



UPDATE:



Here's the sandbox that works: https://codesandbox.io/s/8nopnq3jo0



You were trying to render before the dishes loaded. Hence, added a condition check if the dishes were loaded or not.



function Home(props) {
return (
!props.dishesLoading && (
<div className="container">
<div className="row align-items-start">
<div className="col-12 col-md m-1">
<RenderCard
item={props.dish}
isLoading={props.dishesLoading}
errMess={props.dishesErrMess}
/>
</div>
</div>
</div>
)
);
}






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 19 at 12:03

























answered Nov 19 at 11:39









Vishal Sharma

1,255927




1,255927












  • could you please recheck the codesandbox, I initially forgot to add the <Redirect> to the <switch>, now its added since I am using the router to render the home if no routes are selected. thanks
    – MoSwilam
    Nov 19 at 11:48










  • Updated my answer
    – Vishal Sharma
    Nov 19 at 12:04










  • thanks very much Vishal, Problem solved brother :)
    – MoSwilam
    Nov 19 at 12:07


















  • could you please recheck the codesandbox, I initially forgot to add the <Redirect> to the <switch>, now its added since I am using the router to render the home if no routes are selected. thanks
    – MoSwilam
    Nov 19 at 11:48










  • Updated my answer
    – Vishal Sharma
    Nov 19 at 12:04










  • thanks very much Vishal, Problem solved brother :)
    – MoSwilam
    Nov 19 at 12:07
















could you please recheck the codesandbox, I initially forgot to add the <Redirect> to the <switch>, now its added since I am using the router to render the home if no routes are selected. thanks
– MoSwilam
Nov 19 at 11:48




could you please recheck the codesandbox, I initially forgot to add the <Redirect> to the <switch>, now its added since I am using the router to render the home if no routes are selected. thanks
– MoSwilam
Nov 19 at 11:48












Updated my answer
– Vishal Sharma
Nov 19 at 12:04




Updated my answer
– Vishal Sharma
Nov 19 at 12:04












thanks very much Vishal, Problem solved brother :)
– MoSwilam
Nov 19 at 12:07




thanks very much Vishal, Problem solved brother :)
– MoSwilam
Nov 19 at 12:07


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373449%2freact-with-redux-component-unable-to-recognize-a-property-passed-from-a-parent%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen