@uniflowed/react 0.0.0-alpha.1 → 0.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +20 -67
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,75 +1,28 @@
1
1
  // @flow
2
2
  //
3
- // `@uniflowed/react`: React, re-exported by name.
3
+ // `@uniflowed/react`: React, re-exported.
4
4
  //
5
- // This is the real `react` package, not a declaration of it. Naming every
6
- // export rather than `export *` keeps the surface explicit a name not listed
7
- // here is not part of what uf documents and lets a bundler drop the ones an
8
- // application never touches. The Flow types come from Flow's own library
9
- // definition for `react`, so `import type { Node } from "@uniflowed/react"`
10
- // is exactly `import type { Node } from "react"`.
11
-
12
- import * as React from "react";
5
+ // This is the real `react` package, not a declaration of it. `export *` rather
6
+ // than a list of names, because the list was a second copy of React's export
7
+ // surface that someone had to keep in step with the first and the failure
8
+ // mode of falling behind is an `undefined` an application finds at runtime,
9
+ // long after the name was added upstream.
10
+ //
11
+ // The Flow types come from Flow's own library definition for `react`, so
12
+ // `import type { Node } from "@uniflowed/react"` is exactly
13
+ // `import type { Node } from "react"`.
14
+ //
15
+ // # Which React
16
+ //
17
+ // A peer dependency, so the version is the project's and not uf's. A uf
18
+ // release does not get to decide when an application moves to the next React,
19
+ // and an application can pin or override one with its package manager's
20
+ // `resolutions` without waiting for uf — red line 5, which exists because
21
+ // `react-scripts` was the package that serialised exactly this.
13
22
 
14
- export type {
15
- AbstractComponent,
16
- ChildrenArray,
17
- ComponentType,
18
- Config,
19
- Context,
20
- Element,
21
- ElementConfig,
22
- ElementProps,
23
- ElementRef,
24
- ElementType,
25
- Key,
26
- MixedElement,
27
- Node,
28
- Portal,
29
- Ref,
30
- RefSetter,
31
- StatelessFunctionalComponent,
32
- } from "react";
23
+ export * from "react";
33
24
 
34
- export {
35
- Children,
36
- Component,
37
- Fragment,
38
- Profiler,
39
- PureComponent,
40
- StrictMode,
41
- Suspense,
42
- act,
43
- cache,
44
- cloneElement,
45
- createContext,
46
- createElement,
47
- createRef,
48
- forwardRef,
49
- isValidElement,
50
- lazy,
51
- memo,
52
- startTransition,
53
- use,
54
- useActionState,
55
- useCallback,
56
- useContext,
57
- useDebugValue,
58
- useDeferredValue,
59
- useEffect,
60
- useId,
61
- useImperativeHandle,
62
- useInsertionEffect,
63
- useLayoutEffect,
64
- useMemo,
65
- useOptimistic,
66
- useReducer,
67
- useRef,
68
- useState,
69
- useSyncExternalStore,
70
- useTransition,
71
- version,
72
- } from "react";
25
+ import * as React from "react";
73
26
 
74
27
  /** The setter shape `useState` hands back. */
75
28
  export type SetState<S> = S | ((previous: S) => S);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniflowed/react",
3
- "version": "0.0.0-alpha.1",
3
+ "version": "0.0.0-alpha.4",
4
4
  "description": "React, re-exported by name with its Flow types, for the Unified Toolchain for Flow.",
5
5
  "type": "module",
6
6
  "license": "MIT",