How to change ReactJS styles dynamically?

前端 未结 1 333
星月不相逢
星月不相逢 2020-12-14 13:52

I was trying to run ReactJS inside my twitter bootstrap web app. I have some issues using styles.

Having this div:

   ...
   
1条回答
  •  心在旅途
    2020-12-14 14:34

    Ok, finally found the solution.

    Probably due to lack of experience with ReactJS and web development...

        var Task = React.createClass({
        render: function() {
          var percentage = this.props.children + '%';
          ....
            
    ...

    I created the percentage variable outside in the render function.

    0 讨论(0)
提交回复
热议问题