krzysztofzablocki / Inject

Hot Reloading for Swift applications!
MIT License
2.1k stars 114 forks source link

Pass host to onInjection Hook + Add docs #92

Closed iMostfa closed 4 months ago

iMostfa commented 4 months ago
image

Hello, in This PR i add documentation for the small feature introduced in

91

where it describes when it might be useful, with an example, thanks for the great project <3

krzysztofzablocki commented 4 months ago

@iMostfa you are not really passing any argument to the hook so I don't think that works this way? also you might want to change the prototype to pass in the host so you don't need to cast in the closure itself ?

iMostfa commented 4 months ago

@krzysztofzablocki oh, my previous example wasn't the best, in the example i was capturing the presenter fromself/the world of caller

Screenshot 2024-04-08 at 6 01 15 PM
krzysztofzablocki commented 4 months ago

🙇