DEV Community

Discussion on: Build your first app with Mobx and React

Collapse
 
rosyshrestha profile image
Rosy Shrestha

If you look at the ‘adding comments’ portion of the article, you can do it in a simliar way.

For your case, create an observable rows array and an action creator to add more rows.

@observable rows = [“”]
@action addRows() { this.rows.push(“”)}

Use addRows to dynamically add more rows.