Gobbo
Gobbo
NNuxt
Created by Gobbo on 8/23/2024 in #❓・help
Server doesnt have params when client does
No description
5 replies
NNuxt
Created by Gobbo on 8/15/2024 in #❓・help
SSR and Cookies
No description
2 replies
NNuxt
Created by Gobbo on 8/15/2024 in #❓・help
Nuxt Dev tools crash on hover
No description
2 replies
NNuxt
Created by Gobbo on 8/14/2024 in #❓・help
useCookie empty on client?
No description
4 replies
NNuxt
Created by Gobbo on 8/6/2024 in #❓・help
Weird reactivity issue
No description
6 replies
NNuxt
Created by Gobbo on 5/7/2024 in #❓・help
reactive propagation through parameters
So, I believe I'm doing everything right but heres the layout I have a modal, in which I open by exposing an open function in the modal which sets up my state and refs.
const permissionIndex = ref(0)
const currentIndex = ref(-1)

let state = reactive<any>({})
...

function open(index: number, currentCondition: any, conditionIndex: number = -1) {
state = currentCondition
permissionIndex.value = index
currentIndex.value = conditionIndex

isOpen.value = true
}
const permissionIndex = ref(0)
const currentIndex = ref(-1)

let state = reactive<any>({})
...

function open(index: number, currentCondition: any, conditionIndex: number = -1) {
state = currentCondition
permissionIndex.value = index
currentIndex.value = conditionIndex

isOpen.value = true
}
and this is how I open it when creating new data and editing existing data @click="conditionModal?.open(index, {})" @click="conditionModal?.open(index, condition, kIndex)" My issue - when I want to edit this data, I only want it to edit the state and keep the state to itself, no propagation to anything else - so that when a user hits submit it'll emit and I can handle that outside of the modal however whats happening is, when I update a value in the modal - it updates the state but that also seems to update the "condition" variable I'm passing ( which is a nested object in a ref ) This isnt what I want, I want whatever I update in state to not propagate down the line and to be its own little thing without it updating anything outside.
3 replies
NNuxt
Created by Gobbo on 4/29/2024 in #❓・help
most reusable and least messy way to link query parameters to refs
So typical search design - you change a certain search term, whether that be a boolean, dropdown, search query etc - I'd ideally like that to be binded with the query parameters in your URL so that you can copy and paste it elsewhere for someone else I understand the basic way to do this Have the ref default to the route.query.my_key - then use a watch on the reference and when it updates push to the router. This is good sure - however I have several inputs and having a watch for every single variable will be messy and ugly - especially since they're doing the same thing. I'm asking on whats the best way to make this a lot of cleaner and more reusable for other pages with search filters. I was hoping to create an easy to use composable but wouldnt know where to start with watches and such as its not delved in territory for me so Im asking for pointers and or ideas :)
70 replies
NNuxt
Created by Gobbo on 11/9/2023 in #❓・help
Dynamic routing with static site generation (S3)
I have a route currently that has a dynamic path param - auth - index.vue - [client].vue However, with the deployment generate and an S3 Deployment, I can't access the dynamic path parameter page, any clue on what I could do? It's dynamic for a reason so I can't predefine it
6 replies