React is like Pas2JS and flutter is similar to the ARM compilers. It is not quite clear to me what you mean with "state" in that context.
Freepascal has a full set of database options if you mean storing state in tha sense . I suggest you have a look at LAMW and examples. That will give you some insight of what is possible (although there is a lot more possible than LAMW shows!)