switch value to defaultValue instead of creating a react class