Custom swig extensions to easily use react server rendering