I have a component that was created from a section in a page that had a state loading the results of a page data query. Several elements in that section refer to the state for their content/values. After converting the section into a component, the state became a prop with the same name and everything seemed to work fine in the Editor. However, when previewing, I get a white page with the error $queries is not defined.
The thing is, I cannot find any reference to any queries inside the component. All elements point to a prop and the prop has no default value or preview value.
So the questions are:
- Why does it keep a reference to $queries, if it doesn’t seem to be referenced anywhere?
- Why does it work in the Editor but not in Preview?