Missed the AMA? You can still connect with Christopher Chedeau and ask questions on their Hashnode profile
Thanks for all the questions! I hope the answers were useful and interesting!
Do you think Facebook's BSD + Patent theory for React will help community?
The reality is that the cost of patent-related lawsuits is very real for Facebook. So real that it was put as a "risk factor" in the IPO document: "We are currently, and expect to be in the future, party to patent lawsuits and other intellectual property rights claims that are expensive and time consuming, and, if resolved adversely, could have a significant impact on our business, financial condition, or results of operations." ( https://www.sec.gov/Archives/edgar/data/1326801/000119312512034517/d287954ds1.htm )
If you want to get sense of the dollar values at stake, consider that Facebook bought patents for $550 millions of dollars in 2012 ( https://techcrunch.com/2012/04/23/aols-new-patent-owners-facebook-in-a-550m-deal-with-microsoft/ ), yes, you read it right, half a billion dollars!
React has had its share of controversies since the beginning and our strategy for dealing with them was to over-communicate and explain the reasoning. Unfortunately, we haven't done a good job on this one communication-wise.
The reason is that everything we say publicly on the subject can be used in court during one of those lawsuits. Given the crazy high stakes, the safest strategy is not to say anything. Even though you likely have hundreds of unanswered questions about it, I recommend reading through the three public posts we've published on the subject:
Thanks to the protection that this clause gives us, we have been able to open source so much of our core infrastructure at Facebook! As much as I believe that our open source work is impactful, it doesn't even remotely bring hundreds of millions of dollars to the table.
To conclude, is it an ideal solution? Not really. But like everything in software, it's all about finding the right set of tradeoffs. I've seen so many people empowered to build some really awesome things in response to us open sourcing React, Jest, GraphQL, React Native, Flow, Immutable, Draft, Yoga... that it may not have been the perfect set of tradeoffs, but it feels to me like a good one.
Can you tell us about your journey to Front-end Engineer working on many great projects? How did you started? And in your opinion which are the must know concepts in Computer Science I as a web developer need to learn so that I can understand the principles and contribute to React?
When you join Facebook, you're not allocated to any team during the first month and a half, it's a period called "Bootcamp", where you have a mix of classes to teach you about all the internals of Facebook codebase and infrastructure and time to work on real problems. Once I cleared the first few small tasks assigned by my mentor, I looked at all of them and there was one created by someone named Pete Hunt that piqued my interested that looked along those lines: "We know where faces are in photos, it would be interesting to use this data to improve the tagging experience". And little did I know, I managed to ship a first version of the feature within the first month and it non trivially increased a core Facebook metric! When out of bootcamp, I then joined the photos team full time :)
What according to you is the best tech stack to develop a webapp in 2017?
I'm very familiar with all the tools that we are open sourcing and I think that they are awesome :)
For side projects though, I still love PHP and Apache. The developer experience is still unmatched today. You just winscp to your box, create a file vjeux.php and go to domain.com/vjeux.php and it just works. You don't need to add any dependencies, you don't need to maintain a server running, eating one of your port for every single side project (seriously, who thought it was a good idea...), don't need to use the command line, don't need to setup a transpilation/bundling pipeline, don't need to deal with CORS... You can send the url to someone and it's going to work and keeps working years in the future.
I'm really excited about what people over at Zeit are doing on that front. I feel like they come from the same background and they get how awesome it could be.
What do you think about ReasonML? Can you tell more is ReasonML used actively in Facebook?
An interesting thing is happening is that as we try to solve harder and harder problems, we are finding ourselves wanting to change the programming language we're living within. We have a bunch of efforts at Facebook trying to do so:
- When I joined 5 years ago, we were already adding features by "transpiling" our code.
- We're investing into bytecode representation and optimizations for React Native
One of the big issue is that we don't have a crystal clear idea of what we actually want so exploring many avenues is a really good thing to do, and I'm so glad that Facebook is willing to dedicate so much efforts into those!
I'm not super familiar with the rollout of Reason inside of Facebook, I know that Messenger.com is using it heavily and successfully and I wouldn't be surprised if there was a bunch more other things that are lower profile using it as well. You should ask this to the reason folks on discord, I'm sure they'd be able to give you a better answer.
Hey Christopher, Thanks for the AMA. I have recently started using expo. Can you let me know, what are your thoughts/opinions on Expo vs. ignite vs. create-react-native-app?
Facebook is in a very interesting position regarding React, React Native... because we have very few "apps" and largely operate (or at least try to) as monorepo. This means that we invest in the infrastructure for wiring up everything (linting, IDE integration, bunding, shipping...) once and everything at Facebook uses the same one. This is a stark contrast from the open source world where each project or sub project is a separate repo and you've got to setup everything from scratch.
We have another stance which is that we try to only open source what we use at scale, to make sure that it's actually good.
Those two things are directly conflicting with each others: we can't really open source and do a good job at the workflow that most people use outside of Facebook.
For React, the plan was to wait until the community figures out a canonical way to integrate it into their stack and them promote it out. Unfortunately it didn't happen and after 3 years we just went ahead and did it ourself with create-react-app.
For React Native, we're in a much better state for an unexpected reason: unlike with React where a lot of people integrated it with their existing codebase and infrastructure, with React Native, a lot of people started using it from scratch. So, the task of designing a streamlined experience was much easier and we've seen really polished things like expo, create-react-native-app and ignite coming out of it.
I'm super excited to see non-Facebook companies not only invested in using React Native but also to provide some core features. This way we can really get each piece of the stack being worked on by the people with the best knowledge.
What made you pick up prettier as a project worth your time? Did you have to pitch that it's worth working on in Facebook time?
Ever since Go was released with gofmt, I've been fascinated by the idea of pretty printing the entire codebase. For three reasons:
- On a technical level, what are the algorithms to be able to do that and produce reasonable code
- On an impact level, it's going to avoid wasting so many people's time. See this section of the README for the rationale: https://github.com/prettier/prettier#why-prettier
- On a people level, I wanted to see if I could get good at the convincing game
During the winter break, two people independently started working on a JS pretty printer: James Long on prettier and Pieter Vanderwerff using Reason and the flow infrastructure. I started being the cheerleader by setting them up with unit tests, sense of progress around how many nodes needed to be printed, telling them what looked bad when running through a real codebase so they could fix it...
They both made a lot of progress but unfortunately had to get back to their "real job" at the end the vacation, and I didn't want for yet another effort to die, so I worked on it full time!
As for everything meaningful, you've got to pitch what you want to your manager and the org so that you get support. The good thing is that a bunch of efforts to automatically format code as spinning up at Facebook for various languages (Python, Java, Hack...). So the vision is definitely starting to be shared across the company :)
What drove me crazy is that for the longest time, people dismissed the fact that there were issues when using CSS at scale. The response was along the lines of "look, I'm using Sass and now everything is magically working great". What I wanted from that talk is to get people to admit that there were real issues and start working on solutions for them. On this front, I think it worked way better than anticipated!
As an open source contributor, what are the main challenges you face?
The best advice I ever got was from my wife when she said "is what you are doing is useful for Facebook or are you just playing around?". I feel like this sums up my view of Open Source really well. First and foremost, I want to work on things that are useful and impactful for the people who are paying the bills. Then, if it's more widely useful, then open source it and invest time making it successful outside.
I feel like we've done a really good job so far navigating this, where we've spent 80% or more of the time providing value for Facebook with those projects and then with 20% make a thriving ecosystem around it that in turns benefits Facebook.
What are your favorite things to do AWAY from the computer?
The recent ReactJS license controversy is dangerous to the React community. Don't you think developer or companies will now think twice before adopting React? or React Native? Do you see it as a blow to the flourishing react community?
I see compile to JS languages becoming more and more important due to limitations of JS itself. Do you see those types of higher level languages eventually becoming the web programming platform or will JS evolve into a language that fills those gaps? Do you see JS ever addressing static typing through native language constructs?
Hey Christopher, I have a two part (two very unrelated parts) question for you:
How does it feel to work with absolute legends like Sheryl Sandberg and Mark Zuckerberg in person? Also, is it true that you have these sessions where you can ask Mark Zuckerberg anything every Friday?
This one is more on the technical side of things. React Native is obviously getting a lot of traction of late, but do you really think React Native can permanently replace Android and iOS?
Have you tried flutter? In your opinion, what they have got right and what wrong?
I haven't tried flutter yet myself but I've watched all their external presentations since they started the project and spent a lot of time on their mailing list.
The super short take-over-the-world plan for React has always been in 2 steps: 1) Abstract away the underlying imperative UI representation so that most of the code you write is React. 2) Swap the underlying representation with something designed for React specifically.
What Flutter attempts to do is 2) directly. Let's ditch the entire platform and recreate one from scratch. This is something that we've always wanted to do at some point in the future but we've always felt that it wasn't going to work because it was too much of a big-bang rewrite and there was no incremental adoption story.
I really want them to succeed as the model they are using is a much better one IMO than most of the current imperative-based platforms we have today.
As for our ambitions, I'm really happy that we're exploring it with React VR. This is essentially React with a backend that talks directly to OpenGL. This way we can remove all the middle mens and get absolutely awesome performance and developer productivity.
Hi Vj! Thanks for the AMA. What's the inside story regarding the inception of React Native?
This may be difficult to quantify, but how mature is React Native for Android, relative to RN for iOS?
Now that CSS Grid is more of a thing, how likely is it to replace flexbox in react native? Do you see any benefit in doing so?
What upcoming React feature are you most excited about?
Where do you see the future of AR and open-source? what can the wider developer community help build?
What do you think of this kind of optimisation : https://medium.com/missive-app/45-faster-react-functional-components-now-3509a668e69f Is it still worth it with Reat 16 ?
I really enjoyed reading your origin story below. Now, please complete this sentence... If I weren't a programmer today, I would most likely be earning a living as a [??], and here's why [??].
What are your thoughts on the current state of navigation in React Native?
I think it's possible (but a little hard) to integrate yoga layout into React. What are your opinions on it?
Do you think there are some pain points when working with react? Form validation?
How did you gather the strength to speak your mind in front of many people who may have very different point of view? Like when you made a case for inline css or css-in-js as we have come to know it today.
I introduced Prettier for JS in a project but had to disable it because some developers didnt like how it formats some parts of js code and they also think it is not necessary to wrap code under 80-100 letters , any tips what to do in this case?
Hi Christopher, I am learning react universal rendering with redux. I am following https://github.com/erikras/react-redux-universal-hot-example. The differences in my architecture are, I am not using Ducks as in the example. I am also using isomorphic-fetch instead of superagent. And I am not using any promise middleware since fetch itself return promise to async connect.
But I am facing a strange issue. I have a popup for sign in. And sign in handled on client side completely. After signing in I am storing tokens and sessions in redux state. But when I refresh the browser, all the values in redux state become null. All I want is to retain the sign in data on page reload (server rendering).
Do not know if I could explain you properly. But I am feeling like there must be a missing link in the entire redux flow.
Thanks in advance.
How do you compare Preact with React. What do you feel preact does best compared to React or React to Preact
Do you think its possible to have an alertnative platform for the web thats based off of component based model? Where in the react like framework is sort of built into it?
What are you currently mostly focused on? And what is your favorite third party library?
Do you have any pet projects/technologies you're working on in your off time? If so, what?
I agree change is inevitable. but considering the trend with companies contributing opensource projects, the growth as one aspect is good. But do you any side-effects now or in future in other aspects? eg: a developer career/mind got confused to what to choose? or say one switch to a different organization and suddenly change his ethics of coding ?