Preparing search index...

    Module RecipeFormHelpers

    RecipeFormHelpers - Pure utility functions and prop builders for the Recipe screen

    This module provides stateless helper functions for recipe form management, including:

    • Mode conversion between navigation props and internal state types
    • Recipe data validation for save operations
    • Prop generation for recipe UI components based on current mode
    • Recipe scaling for database normalization

    All functions are pure (no side effects) and can be easily unit tested.

    Interfaces

    RecipeValidationData

    Type Aliases

    ModeConfig

    Variables

    IMAGE_BUTTON_CONFIG
    TITLE_STYLE_CONFIG
    INGREDIENT_MODE_CONFIG
    PREPARATION_MODE_CONFIG

    Functions

    convertModeFromProps
    hasRecipeFromProps
    hasScrapedDataFromProps
    validateRecipeData
    scaleRecipeForSave
    buildRecipeImageProps
    buildRecipeTitleProps
    buildRecipeDescriptionProps
    buildRecipeTagsProps
    buildRecipePersonsProps
    buildRecipeTimeProps
    buildRecipeIngredientsProps
    buildRecipePreparationProps
    buildRecipeNutritionProps
    getValidationButtonConfig
    getMissingFieldsErrorContent
    buildRecipeSourceUrlProps