1

just started learning javascript this week. I have a very noob question. What does exports.displayName = (undefined: ?string); means in react native?

Is this trying to initialize undefined to exports.displayName as string

Thanks coders!

phongyewtong
  • 5,085
  • 13
  • 56
  • 81

1 Answers1

1

Looks like a (Flow? TypeScript?) type annotation for an optional string. It is not Javascript syntax. Yes, it does initialise exports.displayName with the value undefined.

Bergi
  • 630,263
  • 148
  • 957
  • 1,375