Immer - Immer forbids circular references
NewvilleMedia opened this issue · comments
I am trying to query some post and I keep running into the same error: [Immer] Immer forbids circular references
import { DataStore } from '@aws-amplify/datastore';
import { Post } from '../../models'
export default function HomeScreen ({ navigation }) {
const [post, setPost] = useState([]);
const fetchPost = async () => {
const results = await DataStore.query(Post);
setPost(results);
};
useEffect(() => {
fetchPost();
}, []);
Correct, as documented Immer is designed for immutable trees. Something that has circular references is not a tree. If there are mutable objects in your tree that should be ignored, see the immerable
symbol in the documentation on how to ignore those.
Correct, as documented Immer is designed for immutable trees. Something that has circular references is not a tree. If there are mutable objects in your tree that should be ignored, see the
immerable
symbol in the documentation on how to ignore those.
sorry but where is the immerable symbol in the documentation ?