Questions tagged [refs]

Resilient File System

The Resilient File System (ReFS) is Microsoft's newest file system, designed to maximize data availability, scale efficiently to large data sets across diverse workloads, and provide data integrity by means of resiliency to corruption. It seeks to address an expanding set of storage scenarios and establish a foundation for future innovations.

143 questions
51
votes
5 answers

Git command to save a stash without modifying working tree?

I have been wanting to use a git command that saves a stash without modifying my working tree, as a lightweight backup that's safe from any git resets or whatever I might do to screw up my index. Basically the functional equivalent of "git stash…
Eliot
  • 4,685
  • 3
  • 28
  • 28
28
votes
2 answers

Best Practice for globals in clojure, (refs vs alter-var-root)?

I've found myself using the following idiom lately in clojure code. (def *some-global-var* (ref {})) (defn get-global-var [] @*global-var*) (defn update-global-var [val] (dosync (ref-set *global-var* val))) Most of the time this isn't even…
Jeremy Wall
  • 20,762
  • 4
  • 50
  • 72
19
votes
3 answers

How do I list all remote refs?

Recently I created a PR on GitHub, but some tests were failing. And locally even more tests didn't pass. So I tried to figure out what's the issue. And the thing I found out is that Travis was testing the repo being at other commit I don't have. The…
x-yuri
  • 11,554
  • 9
  • 75
  • 122
17
votes
3 answers

How I can use refs to change styling class in ReactJS?

I'm trying to change background of a div when color value changes. Here is my function which receives color value: ChangeColor(oColor) { this.props.ChangeColor(oColor); console.log("Refs: ", this.refs.colorPicker.className); }, Here is…
Muhammad Ateeq Azam
  • 863
  • 1
  • 10
  • 23
17
votes
2 answers

React: Losing ref values

I am using two components and I am using this pattern: child component should stay isolated as much it can - it is handling its own validation error. Parent component should check for errors which have dependencies between children. So, in my case:…
be-codified
  • 4,164
  • 15
  • 37
  • 62
12
votes
2 answers

React array of refs

i have read in a post on Stackoverflow question about refs that we can use something like the following code to assign an array of refs to different inputs like this: {this.Progress[0] =…
Elias Ghali
  • 617
  • 1
  • 7
  • 22
12
votes
2 answers

What's a bad practice with refs in React?

I'm getting to learn React. Some guys of different sites tells everyone that using refs is a bad practice (yep, using them at all). What's the real deal with it? Is it something bad that I will attach it to, for example, child component (so I can…
Krizzu
  • 488
  • 5
  • 19
12
votes
2 answers

React refs do not update between render

So I have this component var LineItemRowsWrapper = React.createClass({ current_lineitem_count: 0, getAjaxData: function(){ var lineitem_data = []; for(var i = 0; i < this.current_lineitem_count; i++){ var data =…
Charles Haro
  • 1,726
  • 3
  • 18
  • 35
11
votes
3 answers

Does git record history of branch heads?

Git branch heads and tags are pointers to commits, and these pointers can move either implicitly (after a commit) or explicitly (after a branch -m). Does Git record the history of the state of these pointers? I see at least two reasons for this: To…
Jake Lundy
  • 111
  • 1
  • 3
10
votes
2 answers

Vue - using refs to focus an element target

When span class="before-click" is clicked, I want it hidden, and input class="after-click" show up instead. And the showed up input tag must be on focused! The problem is when I try to use $refs.afterClick to access that DOM and give it .focus(), an…
Arel Lin
  • 810
  • 1
  • 9
  • 20
9
votes
1 answer

what is the alternative for ReactDOM.findDOMNode() as it is deprecated now?

I have an old code which is using findDOMNode(). Here is my code, where someComponent1 and Expand is already imported. Here I have some doubt the code I have written with findDOMNode() is working perfectly fine but as it is deprecated now I want to…
Bishal Jain
  • 165
  • 1
  • 1
  • 7
8
votes
1 answer

React-Three-Renderer refs not current in componentDidUpdate (MVCE included)

I'm using react-three-renderer (npm, github) for building a scene with three.js. I'm having a problem that I've boiled down to an MVCE. Refs aren't updating in the sequence I expect them to. First, here's the main code to look at: var React =…
Scotty H
  • 5,646
  • 3
  • 27
  • 78
7
votes
2 answers

How do you get the height of a stateless functional component that's a child?

I'm trying to get the height of a stateless child component, so that I'm able to use its height within a parent Class, but I am getting the following error: Invariant Violation: Stateless function components cannot have refs. Simplified code Parent…
A7DC
  • 2,162
  • 2
  • 24
  • 35
6
votes
1 answer

Should multiple Clojure refs be read in a transaction for consistency?

This is a theoretical question motivated by my desire to understand Clojure's concurrency better. Let's say I'm writing boids. Assume each boid is a separate green thread mutating positions in a vector or refs representing a world grid. Think…
Thomas Heywood
  • 883
  • 1
  • 9
  • 18
5
votes
0 answers

Does ReFS handle small files and large deletes faster than NTFS?

I work with developer tools like git and npm/yarn that often generate lots of small files. I know from NTFS performance and large volumes of files and directories (and from experience) that NTFS doesn't handle these as fast as most Unix…
mikemaccana
  • 81,787
  • 73
  • 317
  • 396
1
2 3
9 10