That messages line doesn’t do anything and is completely unneeded. You only need to give the properties you are changing. That is sloppy React. It doesn’t hurt anything, it’s just wasteful. It’s the kind of thing that people write when they’re still learning React.
Keep in mind that the guides are just things that people wrote, they aren’t maintained, and they have to be taken with a grain of salt.