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.

⚡️ Ideas for useful mixins

See original GitHub issue

Presuming mixin functionality remains as we know it today… what are they most useful for? Can we think of any low level implementations like the Logger that would be useful in many projects?

Some inspiration:

  • InternalLinker - handles the routing of internal views
  • MouseTrap - maps mouse events to the app state
  • WindowScroller - maps window scroll position to the state
  • MediaPlayer - wraps native audio/video element state and actions
  • FirebaseStore - connects to realtime db and emits stream events

There are no wrong answers here! Any responses that get many positive reactions will get added to the inspiration list above for others to make note.

📦 Bonus points for extra creative naming

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
FlorianWendelborncommented, Jul 3, 2017

I’m basically using mixins for these things:

  1. share code across hyper app apps (we have one project on @attach-live that has 4-5 instances of HyperApp running in a single website, lol)
  2. scope code by category (Similar to what router does, but for stuff like WebRTC and iframe management/postMessage)
  3. generic logger functionality that I plug into every HyperApp project I have.

To reduce “spam” in my email inbox I unsubscribe from most threads. @mention me if you want to respond.

1reaction
jorgebucarancommented, Jul 23, 2017

@lukejacksonn Good question! Let’s see what kind of response do you get.

By the way, mixins (formerly known as plugins) were introduced when we decided to decouple the previously built-in router from app.js into its own file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 SASS (SCSS) mixins you should be using in your projects
10 Sass (SCSS) mixins you should be using in your projects · 1. Push auto · 2. Pseudo · 3. Responsive ratio ·...
Read more >
10 Awesome SASS (SCSS) Mixins - DEV Community 👩‍💻👨‍💻
1. Box · 2. Flexbox Toolkit · 3. Font Size · 4. Font Face · 5. Cover Background · 6. Pseudo · 7....
Read more >
💅 Styled Components Mixins | ⚡maddev
We'll cover how to make your own custom mixins with Styled Componets and even give you a couple of recipes of useful mixins...
Read more >
Mixin Design Tokens - Medium
In this blog post, I'll demonstrate how you can leverage design tokens and SCSS mixins to capture a system's design language. The final...
Read more >
Sass Mixins: Keep Your Stylesheets DRY - Toptal
In this article, Toptal Freelance Software Engineer Justin Brazeau shows us 10 useful Sass mixins that help keep your stylesheets manageable by breaking ......
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