خرید بک لینک

Vote count: 0

I play with React for few days, everything seemed fairly easily, until I got stuck with rewriting this JS object as a React component.

This is JsFiddle Example with JS object example. How to go about rewriting this as React component?

This is what I was trying:

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import ProgressBar from 'progressbar.js';

class Circle extends Component{
  componentDidMount() {
    this._create(this.props);
  }

  _create(props) {
    var container = ReactDOM.findDOMNode(this.refs.progressBar);
    container.animate(props.progress);
  }

  render() {
   retu <div ref="progressBar"></div>;
  }
}

Circle.defaultProps = {
  options: {},
  progress: 1.0,
}

export default Circle;

asked 44 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 15 خرداد 1395 ساعت: 8:48

صفحه بندی