Skip to content

Commit

Permalink
Add a static factory method
Browse files Browse the repository at this point in the history
  • Loading branch information
rcasanovan committed Sep 20, 2024
1 parent 86b1261 commit 241baac
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions TCA.xctemplate/___FILEBASENAME___View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ struct ___VARIABLE_moduleName___View: View {
}
}

// MARK: - Factory

extension ___VARIABLE_moduleName___View {
static func make() -> Self {
___VARIABLE_moduleName___View(
store: .init(
initialState: ___VARIABLE_moduleName___.State()
) {
___VARIABLE_moduleName___()
}
)
}
}

#if DEBUG

// MARK: Previews
Expand Down

0 comments on commit 241baac

Please sign in to comment.