| 
1 |  | -import Heading from '@theme/Heading'  | 
2 |  | -import clsx from 'clsx'  | 
3 |  | -import type { FC } from 'react'  | 
4 |  | -import { memo } from 'react'  | 
5 |  | -import styles from './styles.module.css'  | 
6 |  | - | 
7 |  | -interface FeatureItem {  | 
8 |  | -  title: string  | 
9 |  | -  description: JSX.Element  | 
10 |  | -}  | 
11 |  | - | 
12 |  | -const FeatureList: FeatureItem[] = [  | 
13 |  | -  {  | 
14 |  | -    title: 'Predictable',  | 
15 |  | -    description: (  | 
16 |  | -      <>  | 
17 |  | -        Like Redux, Reselect gives users a <b>consistent mental model</b> for  | 
18 |  | -        memoizing functions. Extract input values, recalculate when any input  | 
19 |  | -        changes.  | 
20 |  | -      </>  | 
21 |  | -    )  | 
22 |  | -  },  | 
23 |  | -  {  | 
24 |  | -    title: 'Optimized',  | 
25 |  | -    description: (  | 
26 |  | -      <>  | 
27 |  | -        Reselect{' '}  | 
28 |  | -        <b>  | 
29 |  | -          minimizes the number of times expensive computations are performed  | 
30 |  | -        </b>  | 
31 |  | -        , reuses existing result references if nothing has changed, and improves  | 
32 |  | -        performance.  | 
33 |  | -      </>  | 
34 |  | -    )  | 
35 |  | -  },  | 
36 |  | -  {  | 
37 |  | -    title: 'Customizable',  | 
38 |  | -    description: (  | 
39 |  | -      <>  | 
40 |  | -        Reselect comes with fast defaults, but provides{' '}  | 
41 |  | -        <b>flexible customization options</b>. Swap memoization methods, change  | 
42 |  | -        equality checks, and customize for your needs.  | 
43 |  | -      </>  | 
44 |  | -    )  | 
45 |  | -  },  | 
46 |  | -  {  | 
47 |  | -    title: 'Type-Safe',  | 
48 |  | -    description: (  | 
49 |  | -      <>  | 
50 |  | -        Reselect is designed for <b>great TypeScript support</b>. Generated  | 
51 |  | -        selectors infer all types from input selectors.  | 
52 |  | -      </>  | 
53 |  | -    )  | 
54 |  | -  }  | 
55 |  | -]  | 
56 |  | - | 
57 |  | -const Feature: FC<FeatureItem> = memo(({ title, description }) => {  | 
58 |  | -  return (  | 
59 |  | -    <div className={clsx('col col--3')}>  | 
60 |  | -      <div className="text--center padding-horiz--md">  | 
61 |  | -        <Heading as="h3">{title}</Heading>  | 
62 |  | -        <p>{description}</p>  | 
63 |  | -      </div>  | 
64 |  | -    </div>  | 
65 |  | -  )  | 
66 |  | -})  | 
67 |  | - | 
68 |  | -const HomepageFeatures: FC = () => {  | 
69 |  | -  return (  | 
70 |  | -    <section className={styles.features}>  | 
71 |  | -      <div className="container">  | 
72 |  | -        <div className="row">  | 
73 |  | -          {FeatureList.map((props, idx) => (  | 
74 |  | -            <Feature key={idx} {...props} />  | 
75 |  | -          ))}  | 
76 |  | -        </div>  | 
77 |  | -      </div>  | 
78 |  | -    </section>  | 
79 |  | -  )  | 
80 |  | -}  | 
81 |  | - | 
82 |  | -export default memo(HomepageFeatures)  | 
 | 1 | +import Heading from '@theme/Heading'  | 
 | 2 | +import clsx from 'clsx'  | 
 | 3 | +import type { FC, JSX } from 'react'  | 
 | 4 | +import { memo } from 'react'  | 
 | 5 | +import styles from './styles.module.css'  | 
 | 6 | + | 
 | 7 | +interface FeatureItem {  | 
 | 8 | +  title: string  | 
 | 9 | +  description: JSX.Element  | 
 | 10 | +}  | 
 | 11 | + | 
 | 12 | +const FeatureList: FeatureItem[] = [  | 
 | 13 | +  {  | 
 | 14 | +    title: 'Predictable',  | 
 | 15 | +    description: (  | 
 | 16 | +      <>  | 
 | 17 | +        Like Redux, Reselect gives users a <b>consistent mental model</b> for  | 
 | 18 | +        memoizing functions. Extract input values, recalculate when any input  | 
 | 19 | +        changes.  | 
 | 20 | +      </>  | 
 | 21 | +    )  | 
 | 22 | +  },  | 
 | 23 | +  {  | 
 | 24 | +    title: 'Optimized',  | 
 | 25 | +    description: (  | 
 | 26 | +      <>  | 
 | 27 | +        Reselect{' '}  | 
 | 28 | +        <b>  | 
 | 29 | +          minimizes the number of times expensive computations are performed  | 
 | 30 | +        </b>  | 
 | 31 | +        , reuses existing result references if nothing has changed, and improves  | 
 | 32 | +        performance.  | 
 | 33 | +      </>  | 
 | 34 | +    )  | 
 | 35 | +  },  | 
 | 36 | +  {  | 
 | 37 | +    title: 'Customizable',  | 
 | 38 | +    description: (  | 
 | 39 | +      <>  | 
 | 40 | +        Reselect comes with fast defaults, but provides{' '}  | 
 | 41 | +        <b>flexible customization options</b>. Swap memoization methods, change  | 
 | 42 | +        equality checks, and customize for your needs.  | 
 | 43 | +      </>  | 
 | 44 | +    )  | 
 | 45 | +  },  | 
 | 46 | +  {  | 
 | 47 | +    title: 'Type-Safe',  | 
 | 48 | +    description: (  | 
 | 49 | +      <>  | 
 | 50 | +        Reselect is designed for <b>great TypeScript support</b>. Generated  | 
 | 51 | +        selectors infer all types from input selectors.  | 
 | 52 | +      </>  | 
 | 53 | +    )  | 
 | 54 | +  }  | 
 | 55 | +]  | 
 | 56 | + | 
 | 57 | +const Feature: FC<FeatureItem> = memo(({ title, description }) => {  | 
 | 58 | +  return (  | 
 | 59 | +    <div className={clsx('col col--3')}>  | 
 | 60 | +      <div className="text--center padding-horiz--md">  | 
 | 61 | +        <Heading as="h3">{title}</Heading>  | 
 | 62 | +        <p>{description}</p>  | 
 | 63 | +      </div>  | 
 | 64 | +    </div>  | 
 | 65 | +  )  | 
 | 66 | +})  | 
 | 67 | + | 
 | 68 | +const HomepageFeatures: FC = () => {  | 
 | 69 | +  return (  | 
 | 70 | +    <section className={styles.features}>  | 
 | 71 | +      <div className="container">  | 
 | 72 | +        <div className="row">  | 
 | 73 | +          {FeatureList.map((props, idx) => (  | 
 | 74 | +            <Feature key={idx} {...props} />  | 
 | 75 | +          ))}  | 
 | 76 | +        </div>  | 
 | 77 | +      </div>  | 
 | 78 | +    </section>  | 
 | 79 | +  )  | 
 | 80 | +}  | 
 | 81 | + | 
 | 82 | +export default memo(HomepageFeatures)  | 
0 commit comments