Using the API instead of private props