Questions tagged [composable]
160 questions
0
votes
1 answer
Sending some but not all args to a function without defining nulls
I'm using vue 3 and composable files for sharing some functions through my whole app.
My usePluck.js composable file looks like
import { api } from 'boot/axios'
export default function usePlucks() {
const pluckUsers = ({val = null, excludeIds =…

Luciano
- 2,052
- 1
- 16
- 26
0
votes
0 answers
Circular Dependency in Vue 3 Composables
So I've create two composables in vue 3. Both composable depends on each other for certain values.
useAuth.js
// Global State
const state = reactive({
isLoggedIn: false,
authToken: ''
})
export function useAuth() {
const { userData } =…

Faisal Khurshid
- 1,869
- 3
- 21
- 27
0
votes
0 answers
Designing composable function
I am new to android composables. I just had a discussion with my senior on the way we write composable functions. He suggested that passing objects as funtions parameter would result in recomposition if object value changes (not state objects.…

ashwath hegde
- 606
- 8
- 12
0
votes
0 answers
Composable does not remember input when changing configuration in test
I'm writing instrumented tests for a Jetpack Compose component. My composable uses rememberSaveable to remember between configuration changes (activity restarts):
@Composable
fun AddUserScreen() {
Input(
shouldRequestFocus = true,
…

Mahozad
- 18,032
- 13
- 118
- 133
0
votes
1 answer
Why are transparent composables in Jetpack Compose not completely transparent?
In a project I am creating, I want to have a transparent floating button button in one of my screens.
The button should be of a color RGB(126,26,71), with 75% alpha channel.
But, when I create said button composable, it looks like this:
As you can…

PetrHoracek
- 41
- 3
0
votes
1 answer
Laravel + Vue 3: Add item to each element of array from Composable
I'm trying to add toShow to each element of hello array but looping is not working.
The response from api/test (calls TestController) is assigned to hello.
Test.vue