Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate utils #51

Open
ryanve opened this issue Apr 5, 2014 · 1 comment
Open

Deprecate utils #51

ryanve opened this issue Apr 5, 2014 · 1 comment

Comments

@ryanve
Copy link
Owner

ryanve commented Apr 5, 2014

As of the forthcoming 0.9.0 release, all utility methods deprecated. See #19 for context.

0.9 may be the last release to include all these

  • Response.access
  • Response.action
  • Response.affix
  • Response.camelize
  • Response.datatize
  • Response.dataset
  • Response.deletes
  • Response.each
  • Response.map
  • Response.merge
  • Response.object
  • Response.ready
  • Response.resize
  • Response.render
  • Response.route
  • Response.target
  • Response.sift
  • Response.store

Migration and rationale

  • A few of these may remain in a reduced or different form but won't be in the public API.
  • Dataset utils are available as a separate library called dope.
  • Based on the lack of related issues, most people don't use most of these.
  • Most of these should never have been documented. Removing them will help move forward.
ryanve added a commit that referenced this issue Apr 9, 2014
@jerseycheese
Copy link

I'm slightly confused.

So if Response.crossover will be the new event function, how does one run breakpoint-specific JS code if Response.crossover only works when a breakpoint is crossed into?

For example, I'd create the breakpoint set like so:

Breakpoints = {
    SMALL: 320,
    MEDIUM: 768,
    LARGE: 960,
    WIDE: 1200  };
Response.create({
    prop: "width"
    , prefix: "min-width- r src"
    , breakpoints: [1201,961,769,320,0]
    , lazy: true
  });

Then I'd have a Response.crossover() to listen for width changes, like so...

Response.crossover('width', function() {
 // Small/medium code here (anything under 960px)
 if (R.band(Breakpoints.LARGE)) {
   // Large+ code here (anything 960px and wider)
 }
}

But then how do I properly fire some code that should happen in my Breakpoints.LARGE custom breakpoint on pageload? Just run it outside of crossover(), like this?

Response.crossover('width', function() {
 // Small/medium code here (anything under 960px)
}
if (R.band(Breakpoints.LARGE)) {
 // Large+ code here (anything 960px and wider)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants