LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
JS
class Jobs extends React.Component {
    constructor(){
    super();
    this.state = {
      jobs:[]
    }
}

componentDidMount() {
    var self = this;
    $.getJSON("https://codepen.io/jobs.json", function (data) {
        self.setState({
            jobs:data.jobs
        });
    });
}

  
  render() {
    var fulltimejob = this.state.jobs.map(function(el, i){
      return 
  • {el.company_name}
    {el.title}
  • }) return (

    Full Time Job

      {fulltimejob}
    ); } } React.render(, document.getElementById('#main-wrap'));

    Description

    Fetch json data from server on React
    Term
    Wed, 12/27/2017 - 06:58

    Related Codes

    Pen ID
    Pen ID
    Pen ID
    Square Adv