1

I am using my mobx in my React-native app.

mobx: "^6.6.2", mobx-react-lite: "^3.4.0",

mobxStore.js

this.arr = [];

getArray(){
   return this.arr;
}


const temp = appState.getArray();

When fetching state array, I am getting this warning many times.

want to remove this multiline warning from mobx. Thank you for further support.

Jemish Rajpara
  • 119
  • 1
  • 3

1 Answers1

0

I am getting this error since many days and searched a lot to remove this warning and finally i found solution, Here we go.

const temp = appState.getArray().slice();

OR

const temp = appState.arr.slice();

This slice() function will remove it at all.

Jemish Rajpara
  • 119
  • 1
  • 3