Skip to content

Warning: RangeError: Maximum call stack size exceeded (native stack depth) #46

Description

@KobetiakMykola

Is there an existing issue for this?

  • I have searched the existing issues

Explain what you did

After updating to EXPO 53, I am getting this error. It seems the issue is located in rightIcon. But issue stop to be reproducible if not to use Input overrides in theme.

<Input multiline numberOfLines={3} containerStyle={styles.inputContainer} inputContainerStyle={styles.inputInnerContainer} inputStyle={styles.inputText} value={messageText} onChangeText={(value: string) => setMessageText(value)} onFocus={() => {}} rightIcon={ <TouchableOpacity onPress={handleSend}> <Icon name="send" color={dataTemplate.isLoading ? theme.colors.disabled : theme.colors.primary} size={22} /> </TouchableOpacity> } />

Theme part:
` Input: (props, theme) => {
setThemeDefault(props, "inputAccessoryViewID", "done");
setThemeDefault(props, "renderErrorMessage", false);
setThemeStyles(props, "labelStyle", [fontStyles.Size1, { marginBottom: 4 }]);
setThemeStyles(props, "inputStyle", [fontStyles.Size3, fontStyles.PrimaryFamily]);
setThemeStyles(props, "containerStyle", [{ paddingHorizontal: 0, borderRadius: 10 }]);
setThemeStyles(props, "inputContainerStyle", [
{
borderTopWidth: 1.25,
borderLeftWidth: 1.25,
borderBottomWidth: 1.25,
borderRightWidth: 1.25,
borderColor: theme.colors.greyOutline,
borderRadius: 10,
paddingHorizontal: 12,
paddingVertical: 10,
},
]);
setThemeStyles(props, "errorStyle", [{ marginLeft: 0 }]);
setThemeDefault(props, "labelProps", [{ includeFontPadding: false }]);

  console.log(props);

  return props;
},`

Only if I completely delete Input overrides in the theme it works.

I am using 5.1.6 version of rn-vui

"@rn-vui/base": "^5.1.6", "@rn-vui/themed": "^5.1.6",

Expected behavior

The theme should work as expected.

Describe the bug

ERROR Warning: RangeError: Maximum call stack size exceeded (native stack depth)

Steps To Reproduce

Install rn-vui and expo 53.
Create Input using @rn-vui/themed and add rightIcon prop with TouchableOpacity and Icon.

Set up the theme using createTheme and add the Input component. Simply use 
Input: (props, theme) => {
      return props;
}

Open the screen where the Input should be rendered and see the error.

Screenshots

No response

Your Environment

`npx @rn-vui/envinfo`
  ```
    Output from `npx @rn-vui/envinfo` goes here.
  ```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions