Reduce the boilerplate to build DOM fragments