Coder Social home page Coder Social logo

Comments (3)

juice49 avatar juice49 commented on July 20, 2024 1

Happy to close this if it seems weird or out of scope for classnames, but I think it might be quite handy.

I find classnames' ability to do conditions really useful, which unfortunately you don't get with just pushing to an array.

Although I may be missing something obvious 😄.

from classnames.

dcousens avatar dcousens commented on July 20, 2024

I don't know if this module is really that useful if you have an array of classnames?
Just use the array by itself and push?

let classnames = [].prototype.concat.bind([])

I suppose you'd lose out on the optional keys...

from classnames.

michaelzoidl avatar michaelzoidl commented on July 20, 2024

Hey, i think @juice49 meant something like the classnames module creates a new string from the arguments it receives, but react-native expects an array of objects with the stylings instead of an array, so its kind a similar to the bind.js file, but this one also just returns a string.

IMO adding this function to the bind.js would make it more complicated, either there should be a new file (something like classnames/react-native) or outsource it into an separated repo, i prefer the second solution, so i made rn-classnames

@dcousens you can checkout the project, do you think it would make sense to make a note in the README for other react-native developer? :)

from classnames.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.