JSFiddle - React, Tailwind, and code Playground
CoffeeScript
class Child
constructor: (@id) ->
console.log "new child #{@id}"
animations:
start: ->
console.log @, "#{@id} start animations"
class Parent
constructor: ->
@_childs = []
_.each [1..10], (index) =>
@_childs.push new Child(index)
startAll: ->
_.each @_childs, (child) ->
child.animations.start()
parent = new Parent()
parent.startAll()