Go ProSign in
Convert SCSS (Sass) to CSS-in-JS

Convert SCSS (Sass) to CSS-in-JS

Autoplay

    Destructure Named CSS-in-JS Arguments to use in JavaScript Mixin Functions

    Oleg IsonenOleg Isonen
    1:59

    Often times it's hard to remember which order variables have to be used. This is where the concept of named arguments is helpful. The exact same name can then be used inside of a mixin or function.

    To name argument in Sass, you need to put a name before the argument, a similar approach can be used with JavaScript functions. In this lesson, you'll see how you can pass in an object and use that objects keys as the named arguments for the function.

    You must be a Member to view code