colorfy-software / react-native-modalfy

🥞 Modal citizen of React Native.
https://colorfy-software.gitbook.io/react-native-modalfy
MIT License
1.08k stars 44 forks source link

Passing params with TypeScript issue #33

Closed KestasVenslauskas closed 3 years ago

KestasVenslauskas commented 3 years ago

download

I implemented everything by looking at the docs. TypeScript does not complain at all but the value from props.testParam is undefined where value from props.modal.getParam('testParam') is expected but TypeScript shows erros.

CharlesMangwa commented 3 years ago

Hey @KestasVenslauskas! By the looks of it, you're trying to type a modal component (a modal rendered by Modalfy) but correct me if I'm wrong. If that's the case, you shouldn't be using ModalProp as Modalfy exposes a specific interface for modal components: ModalComponentProp. You can follow the related guide in the doc that should get you up and running in no time. Feel free to reopen this issue if your problem wasn't fixed!

KestasVenslauskas commented 3 years ago

Oh right I had to change ModalPropto ModalComponentProp then I can reach my params from modal interface