In order for there to be a state based on law, it does not suffice for there to be any random kind of legislation, and for it to be applied. Already for the Greeks, this type of law was not enough. They wanted eunomos: a law has to be good.
It can happen that law guarantees tyranny and legalizes despotism. Because China has its laws and they are applied doesn't mean that the Chinese live in a state based on law. A state based on law exists when the law is at the service of justice for all and not for the stronger or more numerous group. If I expect the law to protect my life and liberty, it must also protect the life and liberty of others, especially of the weakest members of society.