3

I am currently building a State Manager, which can be integrated into multiple Frontend Framework, including Vue. To demonstrate the usage of the State Manger in Vue, I created a simple codesandbox. Because it is always nice to have a live code example, which can be promoted in the Readme. But somehow, I am always getting this (see below) error in the codesandbox.

[Vue warn]: Property or method "children" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

The above error only occurs in the codesandbox showing the editor + preview. Locally or in a separate tab (which displays only the preview) it works as expected (without error).

Codesandbox (Error):
https://codesandbox.io/s/agilets-first-state-i5xxs?file=/src/main.js

Codesandbox Preview on separate tap (no Error):
https://i5xxs.csb.app/

Local Project (no Error):
https://github.com/agile-ts/agile/tree/master/examples/vue/develop/my-project

I have no idea what I am doing wrong. But it has something to do with my State Manager, since the default vue codesandbox works fine.

tony19
  • 125,647
  • 18
  • 229
  • 307
BennoDev
  • 1,067
  • 1
  • 6
  • 17
  • I looked at your CodeSandbox. I did notice that you are importing and calling a function ```generateId()```. In order for Vue to use it, pretty sure you need to add it to your instance methods: ```methods: { generateId }```. Then call it with ```this.generateId()```. – Tim May 15 '21 at 16:44
  • I don't think so.. because why would it work locally then.. but I'll give it a try.. thanks ;D Edit: I removed the function from the example, but the error still occurs. – BennoDev May 15 '21 at 17:17

1 Answers1

3

Ignore that error. This is a bug in Codesandbox and not directly caused by your own code. One of their developers commented on Apr 13 that the issue is low priority, so it likely won't be fixed anytime soon.

tony19
  • 125,647
  • 18
  • 229
  • 307
  • alright thanks for the information.. as it looks like it has something to do with logging the vue instance.. and as soon I had diesabled the logging it works fine.. thanks for the hint ;D – BennoDev May 16 '21 at 04:01
  • Ahhh I haven't fix that error yet, it's still happening for me more than a year later. A bot closed the issue before it was fixed. Several people commented that it should be open because they are also having an issue but no one from Codesandbox responds. – god_is_love Jul 21 '22 at 19:04