Code Monkey home page Code Monkey logo

yew-feather's People

Contributors

pedrodesu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

yew-feather's Issues

Could you bump this to the latest version of Yew? I'm getting compatability errors with Yew 0.21.0.

error[E0277]: the trait bound `ExternalLink: yew::Component` is not satisfied
  --> src\components.rs:26:92
   |
26 |             <a href={&props.href} target="_blank" rel={"noreferrer noopener"}>{link_text} <ExternalLink /> </a>
   |                                                                                            ^^^^^^^^^^^^ the trait `yew::Component` is not implemented for `ExternalLink`
   |
   = help: the trait `yew::Component` is implemented for `ContextProvider<T>`
   = note: required for `ExternalLink` to implement `yew::BaseComponent`
   = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)

Interested in a PR from my fork?

I've forked yew-feather a few months ago under the assumption that you were not inactive. Thanks for coming back. Wondering, would you appreciate a PR? Let me summarize the changes I did:

  1. Write a working build.rs script. This allows to cargo to compile the crate out of the box without preprocessing such as running npm run-script build. Makes easier to replace the dependency with a git dependency when overriding should yew continue to add breaking changes.
  2. With the above, build fully in rust, including filling in the slug.rs file. This apparently speeds up compile time on my end compares to the js version.
  3. Add a package.lock file to fix the version of feather-icons to depend on. No surprises and subtle differences in icon definitions.
  4. Reuse the same Properties struct for all icons. This is mainly a codegen issue where expanding and checking all the derived impl Property etc has heavy costs which are sidestepping by reusing the properties struct. This alone cut compile times down from 10s to under 4s on my end. The rest seems to be the few hundred of icons definitions. It might be worth to add some (granular) features to enable/disable some icons to make this even faster. Keep in mind the timing is a crude wall-time measurement of this crate only I got from -Z timings and includes the download of feather-icons.
  5. Upgrade the slug code to yew 0.19. I see you bumped the dependency version but didn't yet modify the code.

Let me know what you think, looking forward ๐ŸŽ‰

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.