I'm trying to do a very simple data load from firebase but it wont work when I use path segments in react
something very simple as
import { getFirestore, getDoc, getDocs, setDoc, doc, updateDoc, getCollection, collection } from "firebase/firestore";
import { firebaseConfig } from "config";
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const firestore = getFirestore(app);
getDoc(doc(firestore, 'collection', ['path','to','document']));
it will throw an exception
Uncaught (in promise) TypeError: n.split is not a function
how can i do to pass an array for that function?