frankcollins3 / Next-Water-App

Happy, Healthy Water Cycling App that tracks user/human fluid intake.
https://next-water-app.vercel.app
1 stars 0 forks source link

serving functions with {Context}, an organized {Context}, limiting amt of {Context} @ odds [9:57am] #133

Open frankcollins3 opened 1 week ago

frankcollins3 commented 1 week ago

attempting to do: [ ...reDesign, ...reDeploy ] -> but immediately putting signup & login related functions into context

error: no err, just {...reDoingThings} ... while setting this up I did more of a system than lumping all functions together.

proposed approach: TL:DR; create API of Context served functions to better establish what function corresponds to what feature. self-explanatory I think. one can see where the currentUser object and waterScheduling Object could go (ish)

    iPROMISEcookies: () => any;
    getAndSetCurrentUserPROMISE: (setLocalCurrentUsername: any) => any;
    getUserSettingsPROMISE: () => any;
    setUserSettingsPROMISE: () => any;
    userSettingsSchedulePROMISE: () => any;
    userSettingsIntakePROMISE: () => any;
    getDailyDataPROMISE: () => any;
    setDataStatePROMISE: () => any;
    poorMansLogoutPROMISE: (imgSrc: string) => any;

    signupFunctions: {
        submitFaucetClickSignup: () => any;
    }