Skip to content

public properties #464

@nurk02

Description

@nurk02

Hello! i enjoy using this framework and huge thanks to you for it. there is an issue we faced in our team while using it. I guess from some version of needle you have to change properties(child components) in component as public. Otherwise needle wouldn't be able to see dependency providers. Please update information about it in readme and other documentations.

Example:

final class RootComponent: BootstrapComponent {

//if it is only var someService: SomeServiceType (as internal) it won't work
public var someService: SomeServiceType {
let provider = MoyaProvider(plugins: [NetworkLoggerPlugin()])
return SomeServiceType(provider: provider)
}

//if it is only var someTracker: SomeServiceType (as internal) it won't work
public var someTracker: SomeTracker {
return shared { SomeTrackerImpl(storage: UserDefaultsStorage(),
rootModuleBuilder: self,
someService: someService)
}
}

Thank you. would be thankful if you mention me somewhere in this repo. Wish you all the best! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions