Skip to content

Commit

Permalink
Make README.md highlighting colorful
Browse files Browse the repository at this point in the history
  • Loading branch information
JackYoustra authored May 15, 2023
1 parent 76db643 commit fbad9a5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Composable Analytics provides an `AnalyticsReducer` which provides all the worki

At the entry point of your app when you first create the `Store` you can update the analytics here. This package provides a `.consoleLogger` client and you can add your own too.

```
```swift
Store(
initialState: App.State(),
reducer: App()
Expand All @@ -23,7 +23,7 @@ Store(

Then in any `Reducer` within the app you can add an `AnalyticsReducer` to the `body`. This is created with a function that takes `state` and `action` and returns an optional `AnalyticsData`.

```
```swift
struct App: Reducer {
struct State {
var title: String
Expand Down Expand Up @@ -61,7 +61,7 @@ This package only provides an analytics client for logging to the console. Acces

For example, you may want to log analytics to Firebase. In which case you can add your own clients be extending `AnalyticsClient`...

```
```swift
import Firebase
import FirebaseCrashlytics
import ComposableAnalytics
Expand Down Expand Up @@ -97,7 +97,7 @@ public extension AnalyticsClient {

This could be your Firebase implementation. Which you then add to the store by merging with any other clients you want to use...

```
```swift
let analytics = AnalyticsClient.merge(
// this merges multiple analytics clients into a single instance
.consoleLogger,
Expand All @@ -115,7 +115,7 @@ Store(

This leans into the TCA way of testing. Because all your analytics are sent using Effects. This package provides an `expect` function that can be used to easily tell your test which analytics you are expecting during a test...

```
```swift
import XCTest
import ComposableArchitecture
@testable import App
Expand Down

0 comments on commit fbad9a5

Please sign in to comment.