locked
a quick naming convensions questions RRS feed

  • Question

  • User1034446946 posted

    i am using Formik and due to that props are passed into my components named {field: {name, value}, form}

    now in my functions especially click handlers and such i click to define the value = event.target.value

    now this means my functions has value x 2, which i don't like

    is there a normal way to think about so i can work round it, i have sort of though about naming all my handler values, handlerValue but i am not sure i click that either.

    any suggestions would be appriciated

    Wednesday, November 13, 2019 11:38 PM

Answers

  • User1034446946 posted

    think i have it sorted, gunna use fnValue for function value

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 14, 2019 3:51 PM

All replies

  • User-719153870 posted

    Hi EnenDaveyBoy,

    now this means my functions has value x 2, which i don't like

    is there a normal way to think about so i can work round it, i have sort of though about naming all my handler values, handlerValue but i am not sure i click that either.

    The description is not clear, maybe you could provide any related code? Your components and click hanler?

    Best Regard,

    Yang Shen

    Thursday, November 14, 2019 2:57 AM
  • User1034446946 posted

    think i have it sorted, gunna use fnValue for function value

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 14, 2019 3:51 PM