Hello,
I have a strange error on my weather app that I’m building.
You can find the repo here.
Here is the error I encounter:
var React = require('react');
//var WeatherForm = require('WeatherForm');
var Weather = React.createClass({
render: function() {
return (
<div>
<h3>Weather Component</h3>
{/*<WeatherForm/>*/}
</div>
);
}
});
module.exports = Weather;
This is one component (Weather) and within I want to have another component (WeatherForm) :
var WeatherForm = React.createClass({
renter: function() {
return (
<div>
<input type="text"/>
<button>Get Weather</button>
</div>
);
}
});
module.exports = WeatherForm;
The app is running fine when the code from Weather is commented out (as it is now). But when I want to run it with the WeatherForm component running, it doesn’t show anything on rendering on the webpage.
I am following the tutorial from udemy. I did exactly what he did, even checked 2 times, but it doesn’t work for some reason… It might be that he is using another version of modules? (I upgraded them to the latest version). So far it worked great on everything he thought. And importing one component within another is something generic…
I don’t know what the problem is. Can someone look at it and guide me please?
P.S. I don’t have any errors in my console. Just that I don’t see anything on my localhost:3000/ …