What is a layer? When should I use it?

I read some people said that layer is irrelevant now. Some tutorial uses layer. Some not. Im starting a cocos2dx project with cocos2dx 4. Should I use layer or not?

If you want to. It’s deprecated but not going away.

Or just use Node.

I still use LayerColor in some projects.

I don’t think Layers differ from Nodes very much. (Just has some functions you can override for input it seems, which you can add to a Node anyway.) I like to use Layer instead of Node when I want my node to cover the area of the screen (such as the parent for my UI) because Layers automatically have their content size set to the same as the screen size, but you can manually set the content size of a Node.

When was this deprecated?