Git Product home page Git Product logo

Comments (6)

cyberalien avatar cyberalien commented on May 31, 2024

Good catch! Thanks for reporting it.

I'll try to fix that as soon as possible.

from iconify.

cyberalien avatar cyberalien commented on May 31, 2024

Fixed in @iconify/[email protected].

Couldn't figure out how to unit test it, so it comes without unit tests. However, in react-demo package I've added visual test to make sure it works correctly.

Unfortunately couldn't figure out how to pass it from class to child component, so @iconify/react-with-api doesn't support references yet. I'll try to figure it out.

from iconify.

hrasoa avatar hrasoa commented on May 31, 2024

Great, thanks 👍

from iconify.

cyberalien avatar cyberalien commented on May 31, 2024

I'm really struggling with implementing this with API package.

Problem is, component could be rendered instantly or it could render asynchronously, which means render() might return createElement('span', props) or it could return null. Additionally I'm very ill right now, my brain barely functions, which makes it very hard to come up with solutions.

If you have an idea on how to implement it, please help. Without going into Iconify internal functionality, it just needs to be a component could render synchronously and asynchronously (depending if data has loaded) and passes reference to generated svg (content can be anything, I can adapt code for svg). Currently component is using classes, but using hooks will work fine too (I'm using class because I'm not familiar with hooks enough to create stable component).

from iconify.

cyberalien avatar cyberalien commented on May 31, 2024

Fixed in 3.0.0-dev (currently available in react-restructure branch of this repo). Now API package also supports references, which required full rewrite of component.

from iconify.

hrasoa avatar hrasoa commented on May 31, 2024

Awesome, thank you !

from iconify.

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.