Can't render parent props.prop() vs .attr()Pass props to parent component in React.jsWhat is the difference between state and props in React?Set focus on input after renderReact js onClick can't pass value to methodHow to pass props to this.props.childrenCan't bind to 'ngModel' since it isn't a known property of 'input'`setState` in React portal containing a text input causes browser to scroll in SafariOpenWeatherMap and Swift 4Can't render this.state.city
Can I use "candidate" as a verb?
Is an acid a salt or not?
How to know whether a Tamron lens is compatible with Canon EOS 60D?
Adding Items to Multilist Field using powershell
Is a Lisp program in both prog-mode and lisp-mode?
Was the Ford Model T black because of the speed black paint dries?
How can I get both Giga Drain and Mach Punch on Breloom?
Package, repository and installation process in Linux
Is Arc Length always irrational between two rational points?
Would letting a multiclass character rebuild their character to be single-classed be game-breaking?
Were there any new Pokémon introduced in the movie Pokémon: Detective Pikachu?
How to achieve this rough borders and stippled illustration look?
If Dutch railways suggests a 5-min connection, is it definitely doable?
Why are Hobbits so fond of mushrooms?
The monorail explodes before I can get on it
Is this floating-point optimization allowed?
How do I take a fraction to a negative power?
Do native speakers use ZVE or CPU?
Science writing - exact, precise, or accurate
Is Trump personally blocking people on Twitter?
What is this welding tool I found in my attic?
How might the United Kingdom become a republic?
Does Ubuntu Server 18.04.2 LTS "track" users in any way?
Best wood species for extreme bends?
Can't render parent props
.prop() vs .attr()Pass props to parent component in React.jsWhat is the difference between state and props in React?Set focus on input after renderReact js onClick can't pass value to methodHow to pass props to this.props.childrenCan't bind to 'ngModel' since it isn't a known property of 'input'`setState` in React portal containing a text input causes browser to scroll in SafariOpenWeatherMap and Swift 4Can't render this.state.city
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm making a React app using openweathermap API. Right now I receive the list of weather data. I'm trying to highlight the weather if I click it.
To make this happen, I wrote on App.js to pass a prop to WeatherDetail.js, but so far seems like WeatherDetail.js doesn't recognize props from its parent.
class App extends React.Component
constructor(props)
super(props);
state = forecasts: [], selectedWeather: null
getWeather = async city =>
const response = await weather.get('/forecast',
params:
q: city
);
this.setState (
forecasts: response.data.list,
city: response.data.city.name,
selectedWeather: response.data.list[0]
)
onWeatherSelectFunction = (item) =>
this.setState( selectedWeather: item );
;
render()
return (
<div>
<Form loadWeather=this.getWeather />
<WeatherDetail itemToChild=this.state.selectedWeather />
<WeatherList
onWeatherSelect=this.onWeatherSelectFunction
weathers=this.state.forecasts
city=this.state.city
/>
</div>
);
}
export default App;
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
const WeatherItem = (item, onWeatherSelectFromList, humidity, city, temp ) =>
return (
<div>
<div onClick=() => onWeatherSelectFromList(item) >
city<br /> <-- Appears on screen
humidity<br /> <-- Appears on screen
</div>
</div>
);
;
const WeatherList = (weathers, onWeatherSelect, city) =>
const renderedList = weathers.map((item) =>
return (
<div>
<WeatherItem
city=city
temp=item.main.temp
humidity=item.main.humidity
temperature=item.weather.icon
onWeatherSelectFromList=onWeatherSelect
/>
</div>
);
);
return (
<div className="flex">
renderedList
</div>
);
class Form extends React.Component
state = term: '' ;
onFormSubmit = (event) =>
event.preventDefault();
this.props.loadWeather(this.state.term);
render()
return (
<div>
<form onSubmit=this.onFormSubmit>
<input
ref="textInput"
type="text"
value=this.state.term
onChange=event => this.setState(term: event.target.value)
/>
<button>Get Weather</button>
</form>
</div>
);
How do I connect App.js and WeatherDetail.js using props?
javascript reactjs axios openweathermap
add a comment |
I'm making a React app using openweathermap API. Right now I receive the list of weather data. I'm trying to highlight the weather if I click it.
To make this happen, I wrote on App.js to pass a prop to WeatherDetail.js, but so far seems like WeatherDetail.js doesn't recognize props from its parent.
class App extends React.Component
constructor(props)
super(props);
state = forecasts: [], selectedWeather: null
getWeather = async city =>
const response = await weather.get('/forecast',
params:
q: city
);
this.setState (
forecasts: response.data.list,
city: response.data.city.name,
selectedWeather: response.data.list[0]
)
onWeatherSelectFunction = (item) =>
this.setState( selectedWeather: item );
;
render()
return (
<div>
<Form loadWeather=this.getWeather />
<WeatherDetail itemToChild=this.state.selectedWeather />
<WeatherList
onWeatherSelect=this.onWeatherSelectFunction
weathers=this.state.forecasts
city=this.state.city
/>
</div>
);
}
export default App;
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
const WeatherItem = (item, onWeatherSelectFromList, humidity, city, temp ) =>
return (
<div>
<div onClick=() => onWeatherSelectFromList(item) >
city<br /> <-- Appears on screen
humidity<br /> <-- Appears on screen
</div>
</div>
);
;
const WeatherList = (weathers, onWeatherSelect, city) =>
const renderedList = weathers.map((item) =>
return (
<div>
<WeatherItem
city=city
temp=item.main.temp
humidity=item.main.humidity
temperature=item.weather.icon
onWeatherSelectFromList=onWeatherSelect
/>
</div>
);
);
return (
<div className="flex">
renderedList
</div>
);
class Form extends React.Component
state = term: '' ;
onFormSubmit = (event) =>
event.preventDefault();
this.props.loadWeather(this.state.term);
render()
return (
<div>
<form onSubmit=this.onFormSubmit>
<input
ref="textInput"
type="text"
value=this.state.term
onChange=event => this.setState(term: event.target.value)
/>
<button>Get Weather</button>
</form>
</div>
);
How do I connect App.js and WeatherDetail.js using props?
javascript reactjs axios openweathermap
add a comment |
I'm making a React app using openweathermap API. Right now I receive the list of weather data. I'm trying to highlight the weather if I click it.
To make this happen, I wrote on App.js to pass a prop to WeatherDetail.js, but so far seems like WeatherDetail.js doesn't recognize props from its parent.
class App extends React.Component
constructor(props)
super(props);
state = forecasts: [], selectedWeather: null
getWeather = async city =>
const response = await weather.get('/forecast',
params:
q: city
);
this.setState (
forecasts: response.data.list,
city: response.data.city.name,
selectedWeather: response.data.list[0]
)
onWeatherSelectFunction = (item) =>
this.setState( selectedWeather: item );
;
render()
return (
<div>
<Form loadWeather=this.getWeather />
<WeatherDetail itemToChild=this.state.selectedWeather />
<WeatherList
onWeatherSelect=this.onWeatherSelectFunction
weathers=this.state.forecasts
city=this.state.city
/>
</div>
);
}
export default App;
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
const WeatherItem = (item, onWeatherSelectFromList, humidity, city, temp ) =>
return (
<div>
<div onClick=() => onWeatherSelectFromList(item) >
city<br /> <-- Appears on screen
humidity<br /> <-- Appears on screen
</div>
</div>
);
;
const WeatherList = (weathers, onWeatherSelect, city) =>
const renderedList = weathers.map((item) =>
return (
<div>
<WeatherItem
city=city
temp=item.main.temp
humidity=item.main.humidity
temperature=item.weather.icon
onWeatherSelectFromList=onWeatherSelect
/>
</div>
);
);
return (
<div className="flex">
renderedList
</div>
);
class Form extends React.Component
state = term: '' ;
onFormSubmit = (event) =>
event.preventDefault();
this.props.loadWeather(this.state.term);
render()
return (
<div>
<form onSubmit=this.onFormSubmit>
<input
ref="textInput"
type="text"
value=this.state.term
onChange=event => this.setState(term: event.target.value)
/>
<button>Get Weather</button>
</form>
</div>
);
How do I connect App.js and WeatherDetail.js using props?
javascript reactjs axios openweathermap
I'm making a React app using openweathermap API. Right now I receive the list of weather data. I'm trying to highlight the weather if I click it.
To make this happen, I wrote on App.js to pass a prop to WeatherDetail.js, but so far seems like WeatherDetail.js doesn't recognize props from its parent.
class App extends React.Component
constructor(props)
super(props);
state = forecasts: [], selectedWeather: null
getWeather = async city =>
const response = await weather.get('/forecast',
params:
q: city
);
this.setState (
forecasts: response.data.list,
city: response.data.city.name,
selectedWeather: response.data.list[0]
)
onWeatherSelectFunction = (item) =>
this.setState( selectedWeather: item );
;
render()
return (
<div>
<Form loadWeather=this.getWeather />
<WeatherDetail itemToChild=this.state.selectedWeather />
<WeatherList
onWeatherSelect=this.onWeatherSelectFunction
weathers=this.state.forecasts
city=this.state.city
/>
</div>
);
}
export default App;
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
const WeatherItem = (item, onWeatherSelectFromList, humidity, city, temp ) =>
return (
<div>
<div onClick=() => onWeatherSelectFromList(item) >
city<br /> <-- Appears on screen
humidity<br /> <-- Appears on screen
</div>
</div>
);
;
const WeatherList = (weathers, onWeatherSelect, city) =>
const renderedList = weathers.map((item) =>
return (
<div>
<WeatherItem
city=city
temp=item.main.temp
humidity=item.main.humidity
temperature=item.weather.icon
onWeatherSelectFromList=onWeatherSelect
/>
</div>
);
);
return (
<div className="flex">
renderedList
</div>
);
class Form extends React.Component
state = term: '' ;
onFormSubmit = (event) =>
event.preventDefault();
this.props.loadWeather(this.state.term);
render()
return (
<div>
<form onSubmit=this.onFormSubmit>
<input
ref="textInput"
type="text"
value=this.state.term
onChange=event => this.setState(term: event.target.value)
/>
<button>Get Weather</button>
</form>
</div>
);
How do I connect App.js and WeatherDetail.js using props?
javascript reactjs axios openweathermap
javascript reactjs axios openweathermap
asked Mar 26 at 3:58
kayakkayak
789 bronze badges
789 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
In your App.js file you are passing only one props called itemToChild
<WeatherDetail itemToChild=this.state.selectedWeather />
In your WeatherDetail file from where you're getting forecasts? do you get forecasts from redux store?
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
change your code with this.
const WeatherDetail = (props) =>
console.log("props.itemToChild", props.itemToChild) // check this console that do you get data as you want.
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
I tried the console log and it said 'undefined'. I'm not using Redux, I put forecasts randomly hoping to make things work... I also consoled log 'selectedWeather'. Object appeared in console for the first click, but after second click it starts to say 'undefined'..
– kayak
Mar 26 at 4:33
add a comment |
You have already destructured the props so there is no need to mention props in WeatherDetail component
and also there is an extra parenthesis after the return statement you should remove that also...
Old:
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
New:
const WeatherDetail = ( forecasts, itemToChild ) =>
const weather = itemToChild;
if (!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div>;
;
Thank you! But seems like it's still not working..
– kayak
Mar 26 at 5:43
try to log thethis.state.selectedWeatherin App.js .. Maybe from App.js it can't find the value you are passing to WeatherDetail component...let me know what output it shows after you log the state
– Genius Coders
Mar 26 at 5:46
When I log 'this.state.selectedWeather', an Object appeared on the first click, but after second click it turned to 'undefined'.
– kayak
Mar 26 at 5:49
add a comment |
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',
autoActivateHeartbeat: false,
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55349635%2fcant-render-parent-props%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
In your App.js file you are passing only one props called itemToChild
<WeatherDetail itemToChild=this.state.selectedWeather />
In your WeatherDetail file from where you're getting forecasts? do you get forecasts from redux store?
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
change your code with this.
const WeatherDetail = (props) =>
console.log("props.itemToChild", props.itemToChild) // check this console that do you get data as you want.
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
I tried the console log and it said 'undefined'. I'm not using Redux, I put forecasts randomly hoping to make things work... I also consoled log 'selectedWeather'. Object appeared in console for the first click, but after second click it starts to say 'undefined'..
– kayak
Mar 26 at 4:33
add a comment |
In your App.js file you are passing only one props called itemToChild
<WeatherDetail itemToChild=this.state.selectedWeather />
In your WeatherDetail file from where you're getting forecasts? do you get forecasts from redux store?
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
change your code with this.
const WeatherDetail = (props) =>
console.log("props.itemToChild", props.itemToChild) // check this console that do you get data as you want.
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
I tried the console log and it said 'undefined'. I'm not using Redux, I put forecasts randomly hoping to make things work... I also consoled log 'selectedWeather'. Object appeared in console for the first click, but after second click it starts to say 'undefined'..
– kayak
Mar 26 at 4:33
add a comment |
In your App.js file you are passing only one props called itemToChild
<WeatherDetail itemToChild=this.state.selectedWeather />
In your WeatherDetail file from where you're getting forecasts? do you get forecasts from redux store?
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
change your code with this.
const WeatherDetail = (props) =>
console.log("props.itemToChild", props.itemToChild) // check this console that do you get data as you want.
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
In your App.js file you are passing only one props called itemToChild
<WeatherDetail itemToChild=this.state.selectedWeather />
In your WeatherDetail file from where you're getting forecasts? do you get forecasts from redux store?
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
change your code with this.
const WeatherDetail = (props) =>
console.log("props.itemToChild", props.itemToChild) // check this console that do you get data as you want.
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
answered Mar 26 at 4:26
DhavalDhaval
5921 gold badge11 silver badges31 bronze badges
5921 gold badge11 silver badges31 bronze badges
I tried the console log and it said 'undefined'. I'm not using Redux, I put forecasts randomly hoping to make things work... I also consoled log 'selectedWeather'. Object appeared in console for the first click, but after second click it starts to say 'undefined'..
– kayak
Mar 26 at 4:33
add a comment |
I tried the console log and it said 'undefined'. I'm not using Redux, I put forecasts randomly hoping to make things work... I also consoled log 'selectedWeather'. Object appeared in console for the first click, but after second click it starts to say 'undefined'..
– kayak
Mar 26 at 4:33
I tried the console log and it said 'undefined'. I'm not using Redux, I put forecasts randomly hoping to make things work... I also consoled log 'selectedWeather'. Object appeared in console for the first click, but after second click it starts to say 'undefined'..
– kayak
Mar 26 at 4:33
I tried the console log and it said 'undefined'. I'm not using Redux, I put forecasts randomly hoping to make things work... I also consoled log 'selectedWeather'. Object appeared in console for the first click, but after second click it starts to say 'undefined'..
– kayak
Mar 26 at 4:33
add a comment |
You have already destructured the props so there is no need to mention props in WeatherDetail component
and also there is an extra parenthesis after the return statement you should remove that also...
Old:
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
New:
const WeatherDetail = ( forecasts, itemToChild ) =>
const weather = itemToChild;
if (!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div>;
;
Thank you! But seems like it's still not working..
– kayak
Mar 26 at 5:43
try to log thethis.state.selectedWeatherin App.js .. Maybe from App.js it can't find the value you are passing to WeatherDetail component...let me know what output it shows after you log the state
– Genius Coders
Mar 26 at 5:46
When I log 'this.state.selectedWeather', an Object appeared on the first click, but after second click it turned to 'undefined'.
– kayak
Mar 26 at 5:49
add a comment |
You have already destructured the props so there is no need to mention props in WeatherDetail component
and also there is an extra parenthesis after the return statement you should remove that also...
Old:
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
New:
const WeatherDetail = ( forecasts, itemToChild ) =>
const weather = itemToChild;
if (!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div>;
;
Thank you! But seems like it's still not working..
– kayak
Mar 26 at 5:43
try to log thethis.state.selectedWeatherin App.js .. Maybe from App.js it can't find the value you are passing to WeatherDetail component...let me know what output it shows after you log the state
– Genius Coders
Mar 26 at 5:46
When I log 'this.state.selectedWeather', an Object appeared on the first click, but after second click it turned to 'undefined'.
– kayak
Mar 26 at 5:49
add a comment |
You have already destructured the props so there is no need to mention props in WeatherDetail component
and also there is an extra parenthesis after the return statement you should remove that also...
Old:
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
New:
const WeatherDetail = ( forecasts, itemToChild ) =>
const weather = itemToChild;
if (!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div>;
;
You have already destructured the props so there is no need to mention props in WeatherDetail component
and also there is an extra parenthesis after the return statement you should remove that also...
Old:
const WeatherDetail = (forecasts, itemToChild, props) =>
const weather = props.itemToChild;
if(!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div> <-- This doesn't appear on screen
);
New:
const WeatherDetail = ( forecasts, itemToChild ) =>
const weather = itemToChild;
if (!weather)
return <div>Loading...</div>;
return <div>weather.humidity</div>;
;
answered Mar 26 at 5:16
Genius CodersGenius Coders
93 bronze badges
93 bronze badges
Thank you! But seems like it's still not working..
– kayak
Mar 26 at 5:43
try to log thethis.state.selectedWeatherin App.js .. Maybe from App.js it can't find the value you are passing to WeatherDetail component...let me know what output it shows after you log the state
– Genius Coders
Mar 26 at 5:46
When I log 'this.state.selectedWeather', an Object appeared on the first click, but after second click it turned to 'undefined'.
– kayak
Mar 26 at 5:49
add a comment |
Thank you! But seems like it's still not working..
– kayak
Mar 26 at 5:43
try to log thethis.state.selectedWeatherin App.js .. Maybe from App.js it can't find the value you are passing to WeatherDetail component...let me know what output it shows after you log the state
– Genius Coders
Mar 26 at 5:46
When I log 'this.state.selectedWeather', an Object appeared on the first click, but after second click it turned to 'undefined'.
– kayak
Mar 26 at 5:49
Thank you! But seems like it's still not working..
– kayak
Mar 26 at 5:43
Thank you! But seems like it's still not working..
– kayak
Mar 26 at 5:43
try to log the
this.state.selectedWeather in App.js .. Maybe from App.js it can't find the value you are passing to WeatherDetail component...let me know what output it shows after you log the state– Genius Coders
Mar 26 at 5:46
try to log the
this.state.selectedWeather in App.js .. Maybe from App.js it can't find the value you are passing to WeatherDetail component...let me know what output it shows after you log the state– Genius Coders
Mar 26 at 5:46
When I log 'this.state.selectedWeather', an Object appeared on the first click, but after second click it turned to 'undefined'.
– kayak
Mar 26 at 5:49
When I log 'this.state.selectedWeather', an Object appeared on the first click, but after second click it turned to 'undefined'.
– kayak
Mar 26 at 5:49
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55349635%2fcant-render-parent-props%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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