Hacker Newsnew | past | comments | ask | show | jobs | submit | FLGMwt's commentslogin

The component renders any time the setWhatever function is called, similar to this.setState() in class components. The presumption is anything that you're storing in state is depended on by the component. If it's not, it doesn't make sense to have it in state anyway.


Are you non-sarcastically defending Alex Jones?


His right to free speech? Sure I am.


I'm quite certain he's still speaking, and no one is stopping him. You just can't go to Twitter to hear it.


You have the right to say (almost) anything you want. I have the right to tell you that you can't use my microphone. Someone else has the right to build a microphone tailored for you.


So I suppose you are all for Comcast, AT&T, etc. injecting ads into your traffic, charging premium for your Netflix binges, and worse?

I mean it's their ~~microphone~~ fiber.

Oh, but this is different, I'm sure you'll say, because reasons.

Well that's why we generally, in the US at least, have always thought it was a good idea to just allow all speech, even if some awful stuff leaks out once in a while.


He still has that. Just without someone else's soapbox to stand on. Being obnoxious is a right, but it can invite consequences.


Freedom of speech doesn’t mean freedom from consequence.


The right to free speech is not the right to a platform.


Dvorak: "Twitter and Facebook Are Publishers, Not Platforms" https://www.pcmag.com/commentary/363100/twitter-and-facebook...


[flagged]


Uh huh... that poem had more than one line, and if it started with your version the response would broadly be, “get back to me in a few lines and I’ll start fighting.” Even the fallacy you’re invoking is a slope and not a cliff. The republic isn’t going to implode because Alex Jones can’t use PayPal. Now if the government were throwing him in jail for what he said, I’d grudgingly support his right to be a bloviating psychopath, with rights under the 1st amendment.

Companies not wanting to do business with him? yawn


I highly recommend reading Frederick Douglass' "A Plea for Freedom of Speech in Boston." It was written after he was deplatformed by protesters shouting him down while he was trying to give a speech. It talks about how he thought it was good enough that the government could not block his speech and how wrong he was about that.

Obviously Jones is no Frederick Douglass, but the culture of deplatforming/censorship is a dangerous one nonetheless.


Let’s make a deal, when they start to come for the modern equivalent of a Frederick Douglass, I’ll care, and we’ll still be high up on the list with plenty of time to fight. Until then this feels a lot more like a slippery slope fallacy, and not a sound argument. After all the poem is all about how many chances for intervention were passed by, not that only ideological absolutism can prevent tyranny.

Not to mention that despite attempts to silence him, Douglass was ultimately successful and still remembered.


Who gets to decide who is a Frederick Douglass and who is an Alex Jones? What makes you feel so confident that you will be on the right side of history when the modern Frederick Douglass is deplatformed?


When that modern Frederick Douglass is deplatformed, we can talk, instead of this hysterical “when the world ends where will you be?!” shit. If you have something more than slippery slopes to offer, and comparing Alex Jones to Frederick Douglass, I’m all ears, otherwise, have a good day.


I don't know if any modern Frederick Douglass' are being deplatformed. It's nice to imagine that if I lived in 1863 that I would recognize that Douglass was on the right side of history, but statistically that is unlikely. I highly doubt you would recognize a Frederick Douglass either, if I could manage to point one out. That is why everyone must be allowed to speak.

If I find someone that I think is an Alex Jones, a Nazi, etc. it's easy enough to block them. What I don't do though is tell you that you're not allowed to listen to them either. That's where sensibility turns to authoritarianism. Freedom of speech is not just the right to speak, but also the right to hear.


What I don't do though is tell you that you're not allowed to listen to them either.

No one has said that about Jones, not Apple, or Youtube, and certainly not PayPal. They chose not to publish him or process his payments, and that’s all. In the same way that a book publisher doesn’t owe anyone a book, a radio station isn’t obligated to allow everyone who wants to be a DJ on the air, and TV stations don’t owe anyone a talk show. Yet when it’s the internet people pretend that a company choosing who they do business with is something new, is censorship, etc.

It isn’t, no amount of hand waving and slippery sloping makes it that, and everyone should be sick of these canards being used almost exclusively in regards to conspiracy theorists and far right nutjobs.


For better or worse the public square now exists on FB, Youtube, and Twitter. I haven't suggested that the government should come in and force any of those companies to do business with anyone. I'm more closely suggesting that these companies are doing the modern equivalent to book burning and no one seems concerned about that.

This isn't just far right nutjobs. Youtube decided to delete every single pro-Syrian channel recently which happened to coincide with the battle for Idlib. Apparently Youtube decided anyone opposing the war of aggression being conducted by the US is "Alex Jones" territory. Alex Jones just happened to be pretty famous. Lots of smaller people are being deplatformed, it just doesn't make the news.


Babel has some crazy throughput going through it to drive a massive percentage of the modern web. Wild to see how low the funding is.


seriously. its insane that some startups are raising VC money that 100% would not be able to exist without Babel being maintained. Some of that money should go to Babel but won't. How do we fix this so that Henry doesnt have to keep begging? It's really broken.


This is terrible.

$25 for 12 minutes from one place in the loop to O'Hare

CTA is $2.50 for 37 minutes (the $5 is if you start from O'Hare)

This is only benefitting people for whom 25 minutes is worth $20/$22.50.

$1bn or whatever absurd cost it comes out to be is much better spent on improving transit for the actual public.

Or you know, to stop shutting down schools.

EDIT: typo


It's 37 minutes if you happen to be in the Loop and time the train perfectly. Oh, then it's another 10 minute walk to the gates. Oh and almost none of the Blue Line stations are accessible, so hope you're not in a wheelchair or carrying big bags (who takes luggage to the airport, after all?) Speaking of...where exactly do your bags go on crowded CTA car?

I keep hearing this argument about the Blue Line from people who really don't sound like they've tried it. I'm happy we have it as an option but it's really not ideal. A 12 minute express with short headway and space for bags would be a total game changer. Everyone within ~25 minutes of the Loop would now be able to take transit to/from the airport in 40 minutes, not just people who happen to be going to/from the central business district.

And the city isn't paying any of that $1B, they're really just giving Boring Company permission to try to pay for it on their own. It's not money that would otherwise be spent on CPS. I'm not completely convinced this is really the right solution. My personal pick would be using the Metra NCS route to run an express train and then moving the the O'Hare Transfer Station to be actually inside the airport, which would also make transfers with Amtrak and other Metra services easy. But that too would cost a lot more than $1B, and no one's jumping up to do it.


You are comparing the current state of the Blue Line against a proposed system, though. The argument is that you could improve the Blue Line significantly for $1B, and also that there's good reason to believe it's not actually $1B.

(Doesn't have to be the Blue Line! Metra at Jeff Park or whatever with a track to OHare makes a ton of sense too.)


If we were going spend a cool billion to improve the Blue Line, I'd spend it on anything but making the airport experience better. Make the stations ADA-compliant. Use the extra space on the Congress branch for triple- or quadruple- tracking. Upgrade the power system.

But again, this is $1B not coming out of the CTA budget, it's $1B Elon Musk has burning a hole in his pocket.


What's triple- and quadruple-tracking?


> I keep hearing this argument about the Blue Line from people who really don't sound like they've tried it.

Yep. I traveled from the Loop to O'Hare on the Blue Line with luggage. Once. Never again.

The L just isn't designed for people to be carrying anything larger than maybe a small bag of groceries.


It just seems like this would serve a very narrow market. When I lived in Lincoln Park, I usually planned on the trip to O'Hare taking ~90 minutes (Red->Blue). This was to avoid a $40-$50 cab fare. Would I have been willing to pay an extra $25 to shave off 30 minutes? Probably not.

If I was a business traveler, I would almost certainly prefer taking a car from wherever I was directly to the airport unless I happened to be staying/working right near the stop. The convenience of not having to get to the station, privacy, not having the transfer, etc would outweigh the 20-30 minute savings. Unless traffic was completely backed up in which case having that option is nice.


> This is only benefitting people for whom 25 minutes is worth $20/$22.50.

This is not true for everyone though. Business travelers take cabs between the loop and o'hare. So, $25 is actually faster and cheaper -- so it's a great use of their money! Even if it was more expensive than a cab, most business travelers would happily spend a little more of someone else's (company) money to get there faster.


It would also benefit everyone else because there would be less congestion.


The severity of congestion at peak demand is governed by what people will tolerate. The duration of congestion is what changes when you change capacity. Even if you doubled the amount of every form of transit overnight the severity of congestion at peak would quickly reach equilibrium at about the same level as before.

Peak demand for transit (road, rail, etc) will always exceed available supply as long as the population of people moving at peak is larger than the instantaneous capacity of your transit system. Adding more capacity will always help the overall situation because it shortens the length of the time the that demand is higher than supply.

It's like how course registration at universities tends to saturate the systems involved. Peak demands will always slow things to a crawl but additional capacity is beneficial because it shortens the time the service is degraded. Adding transit of any type doesn't make rush "hour" suck less, it makes rush hour shorter.

edit:rearranged to more clearly make my point


Your comment is more correct if you remove the "No."

"Less congestion" can mean either "shorter span of time" as you further explained, or "less congested at some time point".

The former should be what readers jump to, because "congestion" is nearly binary at a moment in time -- either traffic is flowing smoothly (1-2x optimal travel time) or it is clogged (>2x travel time). "Slightly clogged" isn't really an important case for travelers.


Cabs get you right to the address you want to go though. This will still have the last mile problem.


That is a good point, but they're less reliable during rush hour. I could see people taking this to the loop and then walking to their address if they're close, otherwise grabbing a short cab or uber from there.


For business travelers in Chicago the last mile problem from the middle of the loop is at worst a 10 minute walk.


Cabs in Chicago also are incredibly terrible with rude drivers. Uber is definitely a better option.


That's substantially less of an issue in a dense urban environment like Chicago.


How is walking half a mile with luggage less of an issue?


If that's a problem, you just grab a relatively* cheap cab or Uber/Lyft from where you are to the Boring station.

* "Relatively cheap" compared to taking the cab all the way to O'Hare.


I don't know, I do it all the time.


Easy to get a quick cab from the station though.


The project will be financed by the Boring company, not by the city. The Heathrow express in London work on a similar concept, it takes 15 min to go to Heathrow compared to 1h with the tube, and they charge ~10 times the price of a regular tube ticket.


And Heathrow express is nearly empty all the time...


Well I took it because I was silly enough to buy a flight with a transfer between London City and Heathrow. The first time I took a cab...238 pounds. Kill me. Next time I took the tubes, and was glad to get on the cushy express after the crowded London tubes...and I had to make my flight so another hour would not have worked for me.


Well for clueless tourists like me, I sucked it up and paid up the 50 pounds or whatever it costs for the roundtrip to the airport.


Which is why the Heathrow Connect (as was, it's about to become part of the new Crossrail line and has changed name and operator in the past 2 months I gather), which costs about £11 and runs on the exact same line but stops on the way and takes about 25 mins, has eaten its lunch.


> This is only benefitting people for whom 25 minutes is worth $20/$22.50

Roads suffer from induced demand [1]. You can't build your way out of traffic. The only solutions are tolls or quotas.

In any case, if you can't find anyone willing to pay to use your infrastructure (at a price that recoups the investment), that's a sign you overbuilt.

> transit for the actual public

Cars going through this tunnel are cars off other roads.

[1] https://en.wikipedia.org/wiki/Induced_demand


The concept of induced demand does not say you can't build your way out of traffic. This idea seems to come up a lot in transportation discussions. Driving a car on a road is not free in either money or time, so when a new road fills up it is because more people are going somewhere they want to go and are pay a cost to do so. Yes, when you build a new road near where there are already traffic jams, the new road gets filled up. This is not some magical thing that with infinite roads people will just drive all day so that they are full. I think most people who use this phrase don't quite understand it. The have learned that cars are morally bad and induced demand is some kind of concept that says building new roads for cars is pointless. I ask you, if there was a way for people to have instant point-to-point transportation that had little environmental impact, would you support its implementation?

The whole point of Musk's tunneling project is that with tunnels you can build as many tunnels as you want without the negative aspects of roads which are mainly taking up surface space and making a lot of noise.


Infinite roads are not an option. If there is more pent-up demand than total possible road capacity, then there will never be enough capacity.


"If there is more pent-up demand than total possible road capacity, then there will never be enough capacity." That is a tautology.

With tunnels you can probably increase capacity by 100 times without going very deep. That would support some kind of crazy Hong Kong level density of people in the whole LA basin. Everyone in the US could live there. After that happens one can worry about this infinity demand potential.


Every additional lane and rail is a good thing because it is a net increase in capacity. Even if it's an expensive road or rail it removes the traffic that considers it a good value from everywhere else.

>Roads suffer from induced demand [1].

Demand is a good thing because it's economic activity that wouldn't have happened if the piece of infrastructure in question wasn't built out. Crappy infrastructure increases the cost of geographic distance and that's bad for everyone.

> You can't build your way out of traffic

Reducing traffic isn't the point. The point is getting more people and goods to and from where they need to be. You can slap a $100 price on a subway ticket or a $100 toll on the highway if you want to reduce traffic. That doesn't help anybody except the people rich enough to regularly pay it.

> The only solutions are tolls or quotas.

Which themselves have a bunch of negative side effects because you're basically forcing that traffic onto other roads or other forms of transit and many trips will be forgone in the process.

You can't create capacity out of thin air by manipulating the cost (money, time or some other metric) of the different transit options. You can only create the illusion of capacity by forcing traffic elsewhere.

>In any case, if you can't find anyone willing to pay to use your infrastructure (at a price that recoups the investment), that's a sign you overbuilt.

Or a sign that your prices are so high that other options are still less worse by comparison.


"Demand is a good thing because it's economic activity that wouldn't have happened if the piece of infrastructure in question wasn't built out."

It's economic activity that has a huge amount of negative externalities and infrastructure cost. So if the economic activity generated has a value less than that of the externalities and costs, society is worse off.

So we need a way of limiting demand so that any trip whose benefit is less than its infrastructure and negative externalities doesn't happen.

Currently we mostly do this by making trips really slow and annoying during rush hour. There's obviously a better way but tolls are political suicide.


Pods will be transiting these tunnels, not passenger cars

https://www.inverse.com/article/46041-elon-musk-s-tesla-plan...

> The only solutions are tolls or quotas.

Increasing density of traffic is another solution, for example buses or trains. Elon is proposing one more way to increase the density of traffic: up to 30 levels of tunnels (considering surface density of traffic). I don't know that he can achieve it, but I'm thrilled he's trying.


I'm not sure I understand your argument. On the one hand, you cite induced demand, on the other you say "cars going through this tunnel are cars off other roads".

Isn't that a contradiction? Or are you saying induced demand only works for cars?


The highway corridor from downtown to Ohare is one of the worst commutes in the country. Expanding mass transit is a good thing from this point of view.


Not to interfere with your cynicism, but the important information here is that Boring Co. is funding the construction itself. It's not public money being spent, and schools would be unlikely to receive any extra funding without this project.

And, of course, this project is far more important as a real-world proof-of-concept for the technology than it is for its expected use for travelers. Reducing tunnel costs by 95%(!) would quite obviously result in dramatic quality-of-life improvements.


> Not to interfere with your cynicism, but the important information here is that Boring Co. is funding the construction itself. It's not public money being spent

It's not uncommon for projects to start out that way, and then magically, public money starts appearing anyway.

If this really remains a privately financed project (financed out of the deep pockets of Musk's companies, and completed on time due to Musk's uncannily accurate forecasts), then more power to them!


Chicago doesn't have any money to spend on the project. It's not like there's a kitty and they can pull another few hundred million out to finish the project.


It's a fine idea that public money will not be spent, but you don't have to look very far to find an example of the city and a development partner breaking the same promise (Obama Presidential Center: http://www.chicagotribune.com/news/columnists/kamin/ct-met-o...).


In reality Blue Line (CTA) is much slower, you have to plan for an hour. It's almost impossible to use with big suitcases, it's the only line that's still using the old cars with dividers in the middle of the door. The airport express trains exist in all major European cities where they replace not public transportation but taxi and limousines providing convenient way to travel.


> The airport express trains exist in all major European cities where they replace not public transportation but taxi and limousines providing convenient way to travel.

Well, not all for sure. Many cities just have their normal city train service extended to the airport. I'd guess the express airport trains are common in countries with privatized rail transport, as that is often one of the most lucrative lines.


The 2400 series was retired in 2015. Does the 2600 series have the dividers?


I agree

This is a typical Chicago/Illinois gimmick again The state and the city is so corrupted, another attempt to distract from the other bull-shit they are trying to pull.

The word is, only the mayor and the governor are interested in an express train. Everyone else is happy with the blue-line.

Chicago is so parallized trying to make any decsion. I am ready to bet, the deal will fall aprat during the negocaitions


Assume it does cost $1bn, then that's 40million rides to break even (obviously a lot of other costs I'm ignoring here). If only 5% of people using OHare (80million) take it, then that's 10 years before it is paid back. Considering this infrastructure should last 50 years minimum, it could well be profit generating or at least revenue neutral.


I bet fewer than 50 percent of people who go to O'Hare even leave the airport.


Musk always runs over budget by a multiple, it’s how he rolls. Maintenance is probably three times or more the initial outlay over a 10 year period. So, it probably won’t be profitable or revenue neutral.

But it shouldn’t be. A brand new transportation mode is going to run at a loss until people figure out how to deploy it at scale. It would be weird for it to be profitable from day one.


Maintenance for a tunnel over ten years is not three times the initial outlay.


Budget or timeline?


Simply because you're not the clientele, doesn't mean this is a bad idea. The CTA Blue Line is uncomfortable during rush hour traffic while carrying your luggage. This is probably geared towards tourist/Loop workers who would have paid for a $50-80 Uber/Taxi ride anyways.


> This is only benefitting people for whom 25 minutes is worth $20/$22.50.

This is addressed in the RFQ, which includes a model of time value split into four markets:

Business (HH income under $100K) $33

Business (HH income $100K and over) $92

Non-Business (HH income under $100K) $25

Non-Business (HH income $100K and over) $55

It includes this reasoning:

>In the Project work, the values were adapted from a previous study on express service which found that the value of time for business trips is higher than those of non-business trips to O’Hare. In many recent studies, the value of time for long distance trips and work trips has been shown to be higher than VOT for everyday short trips. Trips to/from an airport could be considered as one leg of long distance travel. Also, the total cost of air travel is much higher than the cost of everyday travel; therefore, travelers may be willing to pay more to reduce the risk of missing their flight. Willingness to pay a high fee for airport trips is reported in other studies, for example, for business trips to airports, Harvey reports $42/hour, Furuichi & Koppelman report $73/hour and Hess and Polak report a value in the range of $93-155/hour. The value of time also varies across regions with large metropolitan areas such as New York/New Jersey having higher values than smaller cities.

In the cited 2016 Airport Survey, taxi rides are still in the double digits for non-business low-income residents and drop-offs are as popular as rail (tripling the amount of time to account for, though I don't think they include this). In their reweighting of the survey (because "the Blue Line survey percentage was thought to be high due to over-represented CTA Blue Line use), the plurality took taxis in every category.

http://chicagoinfrastructure.org/wp-content/uploads/2017/11/...


In comparison, it costs about ~$8-12 for the 80km between Tokyo and NRT (~1.5 hour ride).


A quick google search shows that Chicago is already spending .5bn on improving the blue line (https://www.transitchicago.com/yournewblue/).

Why would they approve this project if they didn't feel this was sufficient?

Only thing I can think is that the demand is going to be strong or they're thinking it's a steal with the contractor buying it out and are willing to experiment.

I'm all for new transit solutions and I'm really interested in this one, picking this route in particular though is what's odd to me...


Based on your logic, people wouldn't be taking taxis/uber to the airport. It is both more expensive and takes longer, but people do it all of the time for the comfort and the quiet (which allows them to work).

This is being built for business travelers. Many people fly in and out of Chicago on a Monday-Thursday schedule, they will use this train. All of those people will now be in a separate tunnel and everyone else will have more room on the highway and Blue Line. Sounds like a win to me.


Tokyo built a toll road under the Bay they said saved an hour off your commute if I’m remembering. Opened about 20 years ago and they are charging around $21 each way if you use the electronic toll system.

https://en.wikipedia.org/wiki/Tokyo_Bay_Aqua-Line


> This is only benefitting people for whom 25 minutes is worth $20/$22.50.

Many of whom get reimbursed by their employers for transportation costs, don't forget. $20 for an airport run is going to look damned cheap to the people who process the expense accounts. It will never be questioned.


This is short sighted. Do you think technology improvements in building out public transit won't make it out to the mass-market which addresses the needs of the general public?


It's well worth it for people who just need to get to the loop. It would be better if the CTA added an express line, but there isn't room on the above-ground tracks.


How much is it worth not to not miss your flight that you spend hundreds of dollars to book?


The usual way is to just reserve enough time to get to the airport, no?


That is true. So a reliable mode of transportation to the airport that is always 15 min saves people more that 20min than an unreliable system that averages 35min but sometime takes say 60 min. To use the unreliable system you have to always plan for the delayed time. Most people don't want to spend even more time sitting around airports.


Pretty awesome living in an oligarchy, no?


I was intrigued to learn that Musk wanted to build what is essentially a new take on the subway, but after reading this article am totally against the proposal. This is looking far more like an option for rich people to get away from the poors. Short of private helicopters, this is one of the few cities where the public transit option is faster than taking a limo. Musk wants to correct that imbalance by creating a faster option for those who can afford it.

Cities should not support such things. I'm not saying that it shouldn't happen, just that the project shouldn't be given any special treatment, indemnification, or tax breaks. And what do we think will happen to the public option when all the influential people start using the premium service?

Notice also that none of the people in the renderings has any luggage. They aren't even wearing coats. To which magical airport are they headed?


I strongly disagree with you.

If this project manages to reduce the cost per mile of building public transportation, the public as a whole will benefit greatly in the years to come. I'm not rich and I would love there to be many more subway lines built out in our cities.

It's the Tesla Roadster of public transit: an expensive proving ground for a technology with a mass-market demand. I'd rather the government give breaks to something with at least a sliver of hope of helping the common person - rather than tax cuts to wealthy, etc.


> If this project manages to reduce the cost per mile of building public transportation, the public as a whole will benefit greatly in the years to come. I'm not rich and I would love there to be many more subway lines built out in our cities.

The purported cost savings are primarily coming from making the system as incompatible as possible with traditional subways (i.e., the proposed tunnels are too small to be refit to accept standard loading gauge tunnels). Beyond that, the entire Loop concept boils down to a really low capacity system (subways generally are capable of moving 20,000 people an hour, all you really need is the rolling stock and traction power to make that happen; this system is talking about 2,000 people an hour with no room for upgrades without boring more tunnels--on par with a single highway lane). While the cost per mile might be reduced, the capacity is so low that the actual cost of the full system would be much higher.


>> 2,000 people an hour with no room for upgrades without boring more tunnels--on par with a single highway lane

2000 for a typical mixed-use highway lane. A dedicated/managed lane can move several times that number. 50-person buses at two per minute = 6000 people per hour. For sheer people moving potential, things like escalators and moving walkways actually do pretty good. They are just very slow.


I should have clarified that 2,000 people an hour assumes ~100% single-occupant vehicles. This does tend to be the norm for highways, unless you're talking specifically about HOV lanes or dedicated bus lanes.


If you never have progress for rich people then you will never have much progress at all.

Where will you build a revolutionary first transportation system for the masses? Literally every form of transport started as a luxury.


What about walking?


No one would choose to walk from the Loop to O'Hare carrying luggage (and of course, some people can't walk).


It was meant as a response to

> Literally every form of transport started as a luxury


Ask the fish.



Rally Health | Chicago, SF, DC, Minneapolis | ONSITE

React Native Engineer

We're hiring a React Native dev to help us build out a high profile consumer-facing app for a Fortune 10 company. You'll join a mixed team of React specialists and native mobile specialists. We're a well-disciplined group, with a strong focus on developer responsibility for quality (with the help of Enzyme and Detox). Our team also has dedicated time blocked off for OSS work to contribute back to the libraries we use.

Rally Health makes consumer-focused healthcare products that help people shop for care with doctor and pricing information, get into healthy habits, and learn about their benefits. Obligatory tech list: Scala, JavaScript, AWS, Postgres, Terraform, Docker, ElasticSearch, etc.

https://www.rallyhealth.com/about/careers/1048473


As an American working in healthcare tech: it is absolutely barbaric.

We have the most expensive medicine in the world, but it's all treatment, not prevention and both only for those who can afford it.


Anyone have an idea why it suggests named functions instead of arrow functions for functional components?


I guess debugging is easier with named functions. Arrow functions don't have names

See here: https://github.com/yannickcr/eslint-plugin-react/issues/412


That was roughly my guess. I asked because I ran into a specific edge case where this is finicky.

AFAIK, arrow functions do (and should) have names if they're assigned to a variable.

  const foo = () => {};
  // undefined
  foo.name
  // "foo"
I ran into a specific bug where this doesn't work for the following case when using babel to target modern versions of node:

  export const foo = () => {};
Note that's only when the declaration is part of an export (https://github.com/babel/babel/issues/7194).

The name works fine in the browser, but since jest/enzyme use node to run tests, I had issues with functional components (defined as arrow functions and immediately exported) were missing their names.

FWIW, this isn't an issue in Babel 7.


Ditto for React. Pretty much every "how do I do this" is covered in the official tutorial and every "how should I do this" is covered by supplemental guides (still official docs).

Some good ones: "thinking in React", "lifting state up", "controlled components", and similar docs in redux: "you might not need redux"


"what to expect with our brave, game-changing webkit security updates"


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: