Better way to populate dataPath for required props