JS backend: generate component functions for data classes.