bracketryjs
Visualize a knockout tournament in the browser

How to change a tournament (replace all data)


change data

replaceData()

It's one of the functions returned from createBracket() Calling this method is almost identical to installing bracket (calling createBracket) into the same wrapper element.

Parameters
Return value
    undefined

import { createBracket } from 'bracketry'

const wrapper = document.querySelector('#your-wrapper-element')
const data = { ... }

const bracket = createBracket(data, wrapper)

bracket.replaceData(someNewData)

If you want to update individual matches (e.g., only some scores), replaceData will NOT be the best idea. Use applyMatchesUpdates instead.