Существует 2 решения:
1) Экспортируйте непосредственно значение
export default {
requests: [
{
"id": 9,
"timestamp": Date.now(),
"description": "Need help with ordering",
"status": "Completed"
},
{
"id": 2,
"timestamp": Date.now(),
"description": "Need help with ordering",
"status": "Assistance Requested"
},
{
"id": 4,
"timestamp": Date.now(),
"description": "Need help with ordering",
"status": "Assistance Requested"
}
]
}
2) Сначала создайте переменную, а затем экспортируйте ее:
const initState = {
requests: [
{
"id": 9,
"timestamp": Date.now(),
"description": "Need help with ordering",
"status": "Completed"
},
{
"id": 2,
"timestamp": Date.now(),
"description": "Need help with ordering",
"status": "Assistance Requested"
},
{
"id": 4,
"timestamp": Date.now(),
"description": "Need help with ordering",
"status": "Assistance Requested"
}
]
}
export default initState