React: Why do you write this

Created on 20 Dec 2017  路  5Comments  路  Source: facebook/react

react/packages/react/src/ReactCurrentOwner.js:23
current: (null: null | Fiber)
react/packages/react/src/ReactDebugCurrentFrame.js:14
ReactDebugCurrentFrame.getCurrentStack = (null: null | (() => string | null));

use flow . null?

Most helpful comment

yes, sorry if that come of dismissive, i wrote it on my phone!

All 5 comments

? Sorry what?

I don't understand why these two lines of code write this. What is the meaning

Those are setting values to null while casting it to a specific type.

In general the issuer tracker isn't the place the ask general questions about the code base, but reserved for bug reports or Features. Thanks!

I think it is appropriate to ask questions about the codebase if one is looking to contribute. :-)
But that's better done in specific issues you're working on.

yes, sorry if that come of dismissive, i wrote it on my phone!

Was this page helpful?
0 / 5 - 0 ratings