The following demonstrates what's a state function and what's not a state function.
is not exact differential for a gas obeying van der Waals' equation, but is as demonstrated below:
We assume quasistatic situation, so .
Now, you take the cross partial derivatives.
They are not equal; hence, is not exact differential (not a state function).
However, if we take it will be exact differential (a state function).
Take the cross partial derivatives.
Both are equal making exact differential (a state function).