3.1.0 • Published 4 years ago

@kalleguld/react-props v3.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

react-props

A slightly better way of managing state in react.

Start by calling const p = useProp('asdf'), which returns a Prop<string>. Pass the prop to an <Input> with <Input prop={p}>.

Use map() to "slice" a big Prop into smaller pieces for easier consumption:

const person = useProp({
    name: "Santa Claus",
    email: "santa@northpole.net",
    socialMedia: {
        instagram: "theRealSanta",
        youtube: "@santa1",
    }
    isWatching: true
});

const name = map(person, 'name');
const email = map(person, 'email');
const youtube = map(person, 'socialMedia','youtube'):
2.2.0

4 years ago

2.1.1

4 years ago

2.2.3

4 years ago

2.2.2

4 years ago

3.1.0

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.10

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago