Skip to content

Commit e28e9d5

Browse files
committed
Added problem/solution
1 parent 0b18aed commit e28e9d5

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Questions to answer:
3+
*/
4+
5+
// 1. What is the React namespace?
6+
// 1a. Why can it be accessed globally as a type?
7+
type Example = React.ReactNode;
8+
// ^?
9+
10+
/**
11+
* 2a. Most namespaces can't be used as values. So how come
12+
* we can use React as a value here?
13+
*
14+
* HINT - we're adding LOTS of things to React's namespace in
15+
* later exercises, so make sure when you go-to-definition you
16+
* go to its original definition, in @types/react/index.d.ts.
17+
*/
18+
const element = React.createElement("div");
19+
// ^?
20+
21+
export {};

0 commit comments

Comments
 (0)