question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Normalize actions/events signatures.

See original GitHub issue

tl;dr

Make all functions in the API follow the same signature:

(state, actions, data, emit)


Now

  • view(state, actions)
  • actions.myAction(state, data, actions, emit)
  • events.loaded(state, actions, emit)
  • events.action(state, actions, data, emit)
  • events.update(state, actions, data, emit)
  • events.render(state, actions, data, emit)

After

  • view(state, actions)
  • actions.myAction(state, actions, data, emit)
  • events.loaded(state, actions, emit)
  • events.action(state, actions, data, emit)
  • events.update(state, actions, data, emit)
  • events.render(state, actions, data, emit)

Tentative: Pass the options (the same from app(options)) object to loaded as data, so it can match the proposed signature too. 🤔

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
jorgebucarancommented, Apr 21, 2017

This is a breaking change, as you’ll need to modify all your actions signature from:

(state, data, actions)

to

(state, actions, data)

@selfup @pedroborges @cdeutmeyer @lukejacksonn Are we okay with this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Federal Register :: Self-Regulatory Organizations; The ...
All submissions should refer to File Number SR-DTC-2022-013 and should be submitted on or before January 17, 2023. Start Signature. For the ...
Read more >
Normalization of signatures with respect to size and location ...
This paper proposes an online signature verification method based on the finite impulse response (FIR) system characterizing time-frequency characteristics ...
Read more >
JDN 1-20, Identity Activities - Joint Staff
Processing and exploitation include data normalization, biometric matching, forensic analysis, technical (i.e., electronic and mechanical) ...
Read more >
DigestAlgorithms (iText 7 7.2.1 API)
Algorithm available for signatures since PDF 1.7. static String · SHA1 ... Parameters: algo - the name to be normalized; Returns: normalized name ......
Read more >
THE CLINICIAN'S GUIDE TO WRITING TREATMENT PLANS ...
Instead of proceeding, signing forms, and getting the interview done, it would be better to stop, slow down, and comment on what you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found