Put the boneless, skinless chicken, yellow onion, celery, carrots, salt, black peppercorns and bay leaves in a large saucepan. Add enough cold water to cover the chicken completely.
Bring to a rolling boil over high heat.
Once boiling, reduce the heat to low, cover with a lid and simmer gently for 15–20 minutes if using breasts, or 20–25 minutes for thighs.
Make sure the chicken reaches an internal temperature of 74°C at its thickest point and that no pink remains.
Lift the chicken out of the pan and leave it to rest on a chopping board for 5–10 minutes.
Use two forks to shred the chicken into bite-sized pieces.
Strain the cooking liquid through a fine sieve into a jug, discarding the solids, and reserve the homemade stock.