Fork me on GitHub
#reagent
<
2019-04-04
>
Bravi19:04:50

hi everyone

Bravi19:04:12

I’m trying to use reagent.impl.util/extract-props but when I try to import reagent.impl.util, it says it cannot find it

Bravi19:04:27

does it not come with reagent?

lilactown19:04:01

I def see that file, but I don’t see that function

lilactown19:04:13

what are you trying to do?

Bravi19:04:38

I’m trying to use it in component-will-receive-props to extract the new props

lilactown19:04:21

it looks like that function was moved to reagent.impl.component/extract-props in 2015

Bravi19:04:05

thank you 🙂

Bravi19:04:10

I’ll give that a try

lilactown19:04:23

np. yeah I’m just looking at the reagent repo

lilactown19:04:15

there’s even an errant comment in reagent.impl.util that says:

;;; props accessors

lilactown19:04:22

with no code underneath it LOL

lilactown19:04:06

git history to the rescue :)

Bravi19:04:32

works like a charm, thank you

juhoteperi19:04:59

I'd recommend copying the function to your own code base, it's just 3 lines. impl means that the fn isn't meant to be used by external users, and Reagent doesn't provide any promises that the function will be present or work the same way in future versions.

👍 4