<commit_before>
<!-- leave this H1 here. It stops mkdocs putting in a Title at the top.
     It needs to be at the top of the file otherwise it breaks the 
     table of contents on the right hand side. -->
#

> Note: the re-frame [Clojars page](https://clojars.org/re-frame/) contains dependency coordinates for each release (Maven/deps/Lein). 

## Unreleased

#### Added

  - 

#### Changed

  - 

## 1.1.1 (2020-08-26)

#### Added

- The built-in effect `:dispatch-later` can now take a single map value. 
  Supplying a sequence of maps is now deprecated in favour of using multiple `:dispatch-later` effects within the new 
  `:fx` effect. See the [API documentation](http://day8.github.io/re-frame/api-builtin-effects/#dispatch-later). 

## 1.1.0 (2020-08-24)

#### Added

- re-frame now guarantees that a `:db` effect, if present, will be actioned before any other sibling effects. 
  re-frame continues to provide no guarantees about the order in which other effects will be actioned. 

- Added an new `:fx` built-in effect handler. 

  Previously, you might have returned effects like this:
  
    (reg-event-fx 
     :token 
    (fn [{:keys [db]} [_ id]]
      {:db (assoc db :twirly true) 
       :dispatch [:blah]
       :full-screen true
       :http  (list 
                  {:method :GET :url "http://abc.com/endpoint" ...}
                  {:method :POST :url "http://blah.com/endpoint" ...})}))

  
  but now, using `:fx`:
  
    (reg-event-fx 
     :token 
    (fn [{:keys [db]} [_ id]]
       {:db (assoc db :twirly true) 
        :fx [ [:dispatch     [:blah]] 
              [:full-screen  true]
              [:http         {:method :GET :url "http://abc.com/endpoint" ...}]
              [:http         {:method :POST :url "http://blah.com/endpoint" ...}] 
            
              (when seventies? [:hair "side burns"])]     ;; nils are ignored
  
  Notes:
  
  - the effect `:fx` will be associated with a `seq`, typically a vector
  - the effects in `:fx` will be actioned in `seq` order
  - each element in the `seq` should be a `2-vector`. This vector will contain an effect-id, typically a keyword, and an effect payload. 
  - if any element of `:fx` is nil, it will be ignored. This allows effects to be conditionally included via a `when` (an example is given above)
  - `:db` effects should not be put into `:fx`. re-frame will emit a warning if it finds one.
  
  Benifits:
  
  - `:fx` allows for effects to be ordered
  - you can include the same kind of effect multiple times (eg `:dispatch`) which means there is no longer 
    any need for special effects like `:dispatch-n`. Indeed, all `*-n` style effects are now redundant.
  - this is a stepping stone towards making it easier to create an event handler which is a composition of 
    other functions. We imagine circumstances in the future in which event handlers might be written more 
    like this:
    
    
        (reg-event-xxxx       ;; <-- a new kind of registration function
          :event-id  
          interceptors 
          [function1 function2 function3])
      
      See exploratory discussion [here](https://github.com/day8/re-frame/issues/639#issuecomment-680500053) and [here](https://github.com/day8/re-frame/issues/639#issuecomment-682250517)
      
  
  This new effect is described in the [API docs](https://day8.github.io/re-frame/api-builtin-effects/#fx).<commit_msg>Update 2020.md<commit_after>
<!-- leave this H1 here. It stops mkdocs putting in a Title at the top.
     It needs to be at the top of the file otherwise it breaks the 
     table of contents on the right hand side. -->
#

> Note: the re-frame [Clojars page](https://clojars.org/re-frame/) contains dependency coordinates for each release (Maven/deps/Lein). 

## Unreleased

#### Added

  - 

#### Changed

  - 

## 1.1.1 (2020-08-26)

#### Added

- The built-in effect `:dispatch-later` can now take a single map value. 
  Supplying a sequence of maps is now deprecated in favour of using multiple `:dispatch-later` effects within the new 
  `:fx` effect. See the [API documentation](http://day8.github.io/re-frame/api-builtin-effects/#dispatch-later). 

## 1.1.0 (2020-08-24)

#### Added

- re-frame now guarantees that a `:db` effect, if present, will be actioned before any other sibling effects. 
  re-frame continues to provide no guarantees about the order in which other effects will be actioned. 

- Added an new `:fx` built-in effect handler.
  Previously, you might have returned effects like this:
  
        (reg-event-fx 
          :token 
          (fn [{:keys [db]} [_ id]]
            {:db (assoc db :twirly true) 
             :dispatch [:blah]
             :full-screen true
             :http  (list 
                      {:method :GET :url "http://abc.com/endpoint" ...}
                      {:method :POST :url "http://blah.com/endpoint" ...})}))
                      
  but now, using `:fx`:
  
        (reg-event-fx 
          :token 
          (fn [{:keys [db]} [_ id]]
            {:db (assoc db :twirly true) 
             :fx [ [:dispatch     [:blah]] 
                   [:full-screen  true]
                   [:http         {:method :GET :url "http://abc.com/endpoint" ...}]
                   [:http         {:method :POST :url "http://blah.com/endpoint" ...}] 
            
                   (when seventies? [:hair "side burns"])]     ;; nils are ignored
  
  Notes:
  
  - the effect `:fx` will be associated with a `seq`, typically a vector
  - the effects in `:fx` will be actioned in `seq` order
  - each element in the `seq` should be a `2-vector`. This vector will contain an effect-id, typically a keyword, and an effect payload. 
  - if any element of `:fx` is nil, it will be ignored. This allows effects to be conditionally included via a `when` (an example is given above)
  - `:db` effects should not be put into `:fx`. re-frame will emit a warning if it finds one.
  
  Benifits:
  
  - `:fx` allows for effects to be ordered
  - you can include the same kind of effect multiple times (eg `:dispatch`) which means there is no longer 
    any need for special effects like `:dispatch-n`. Indeed, all `*-n` style effects are now redundant.
  - this is a stepping stone towards making it easier to create an event handler which is a composition of 
    other functions. We imagine circumstances in the future in which event handlers might be written more 
    like this:
    
        (reg-event-xxxx       ;; <-- a new kind of registration function
          :event-id  
          interceptors 
          [function1 function2 function3])
      
      See exploratory discussion [here](https://github.com/day8/re-frame/issues/639#issuecomment-680500053) and [here](https://github.com/day8/re-frame/issues/639#issuecomment-682250517)
      
  
  This new effect is described in the [API docs](https://day8.github.io/re-frame/api-builtin-effects/#fx).
{'fraction_non_alphanumeric': 0.1145636706838972, 'fraction_numerical': 0.016552925802236097, 'mean_word_length': 2.3715124816446402, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1510203', 'n_tokens_mistral': 2176, 'n_tokens_neox': 1989, 'n_words': 794}