About 9,890,000 results
Open links in new tab
  1. vuejs3 - ref vs reactive in Vue 3? - Stack Overflow

    Apr 27, 2020 · ref() seems like the way to go since it supports all object types and allows reassigning with .value. ref() is a good place to start, but as you get used to the API, know that …

  2. What is the use of "ref" for reference-type variables in C#?

    I understand that if I pass a value-type (int, struct, etc.) as a parameter (without the ref keyword), a copy of that variable is passed to the method, but if I use the ref keyword a reference to that …

  3. How to get $refs using Composition API in Vue3?

    Feb 12, 2022 · Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising Reach devs & technologists worldwide about your …

  4. reactjs - React 19 "ref as prop" and TypeScript - Stack Overflow

    Dec 5, 2024 · Since ref is now a prop, you can just spread all props without worrying about types. This way React ...

  5. Why use the 'ref' keyword when passing an object?

    Using ref gives the method freedom to change the argument for something else, callers of the method will need to be coded to ensure they handle this possibility. Also, when the parameter …

  6. Passing properties by reference in C# - Stack Overflow

    Feb 11, 2016 · C#7 introduced ref returns, which means you can now define the property to return a ref to the value. Given you have a method like this. void SetValue(ref int valueByRef) { …

  7. Pass by Reference in C# - Stack Overflow

    Oct 26, 2009 · As others have said, you should use the ref modifier at both the call site and the method declaration to indicate that you want to use by-reference semantics. However, you …

  8. python - How do I pass a variable by reference? - Stack Overflow

    Jun 12, 2009 · Arguments are passed by assignment.The rationale behind this is twofold: the parameter passed in is actually a reference to an object (but the reference is passed by value)

  9. reactjs - Is it safe to use ref.current as useEffect's dependency …

    Mar 1, 2020 · I've read this comment saying ref should be used in useEffect, but I can't figure out any case where ref.current is changed but an effect will not trigger. As that issue suggested, I …

  10. c# - When to use in vs ref vs out - Stack Overflow

    Basically both ref and out for passing object/value between methods. The out keyword causes arguments to be passed by reference. This is like the ref keyword, except that ref requires that …