Questions tagged [miragejs]
50 questions
0
votes
1 answer
How do you return an array of string ids using a factory in MirageJS?
In MirageJS I am trying to create a factory for a simple array model.
Current code
Here is my code:
let server = new Server({
models: {
usertab: Model
},
factories: {
usertab: Factory.extend( function(i) { return i } ),
…

hitautodestruct
- 20,081
- 13
- 69
- 93
0
votes
1 answer
createList does not pick up relationship in Mirage js
I am trying to create multiple posts that belong to a user using Mirage js createList facility. I have created models with corresponding relationships:
models: {
user: Model.extend({
posts: hasMany(),
}),
post: Model.extend({
…

J Doe
- 132
- 7
0
votes
0 answers
MirageJS not finding route - VueJS
We are trying MirageJS in our VueJS application and in a login screen, it makes a request post("auth/signin"). The api url is like http://localhost/v1 and it is configured in Axios instance as baseUrl. The MirageJS server routes has…

Gabriel Silva
- 69
- 1
- 9
-1
votes
3 answers
Issue with redirect React Router 6 and MirageJS. Why is my redirect throwing this error?
I'm currently building the Vanlife app for my https://scrimba.com/learn/reactrouter6 React Router 6 course on Scrimba and I've ran into an interesting issue (same as this user actually…

SimoneMass
- 11
- 2
-2
votes
1 answer
67:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "
I'm doing a tutorial from scrimba for react and react router 6 and I'm encountering an error with the provided data. The error says 67:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "

Vicente Antonio G. Reyes
- 636
- 9
- 24