rename parameter of state() from 'callback' to just 'func' to be aligned with remaining API