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;








1















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?










share|improve this question




























    1















    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?










    share|improve this question
























      1












      1








      1


      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?










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 3:58









      kayakkayak

      789 bronze badges




      789 bronze badges






















          2 Answers
          2






          active

          oldest

          votes


















          1














          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
          );






          share|improve this answer























          • 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


















          0














          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>;
          ;





          share|improve this answer























          • 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












          • 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













          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
          );



          );













          draft saved

          draft discarded


















          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









          1














          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
          );






          share|improve this answer























          • 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















          1














          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
          );






          share|improve this answer























          • 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













          1












          1








          1







          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
          );






          share|improve this answer













          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
          );







          share|improve this answer












          share|improve this answer



          share|improve this answer










          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

















          • 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













          0














          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>;
          ;





          share|improve this answer























          • 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












          • 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















          0














          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>;
          ;





          share|improve this answer























          • 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












          • 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













          0












          0








          0







          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>;
          ;





          share|improve this answer













          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>;
          ;






          share|improve this answer












          share|improve this answer



          share|improve this answer










          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 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

















          • 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












          • 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

















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해