Giter Site home page Giter Site logo

Comments (15)

rektdeckard avatar rektdeckard commented on April 21, 2024 4

Prelim support added in v2.0.0, under new package name @phosphor-icons/react. Looking at ways in future of not needing to force IconBase onto the client, because rendering the entire icon on the server would be sweet but I don't want to break the context use case.

from react.

sungvzer avatar sungvzer commented on April 21, 2024 3

+1
One of the best features of Next.js is server components and because Phosphor Icons uses React contexts it cannot be used in a Next 13 project unless a client component is used, which kinda defeats the purpose of server components.

from react.

rektdeckard avatar rektdeckard commented on April 21, 2024 3

Hey all. Looking into this for upcoming 2.0 release 👍

from react.

ozgur-dogan avatar ozgur-dogan commented on April 21, 2024 2

+1

from react.

maximehery avatar maximehery commented on April 21, 2024 2

+1

from react.

its-monotype avatar its-monotype commented on April 21, 2024 2

My favorite icons, I like them so much. I am incredibly grateful to the creators 😍

from react.

rektdeckard avatar rektdeckard commented on April 21, 2024 2

Wondering what people feel would be good default styling in lieu of context server-side -- black, regular weight, 1em size?

from react.

L-Marcel avatar L-Marcel commented on April 21, 2024 1

+1

from react.

MatheusPires99 avatar MatheusPires99 commented on April 21, 2024 1

Any updates on this topic?

from react.

vnugent avatar vnugent commented on April 21, 2024 1

I love this library!
@rektdeckard whenever we can use it our Next projects could you please leave a comment here? (so we all can get a notification). Thank you very much!

from react.

eiiot avatar eiiot commented on April 21, 2024

+1

from react.

melkstam avatar melkstam commented on April 21, 2024

Wondering what people feel would be good default styling in lieu of context server-side -- black, regular weight, 1em size?

I feel like that these are pretty good default values and is what I would expect.

from react.

rektdeckard avatar rektdeckard commented on April 21, 2024

Having read and partially 😂 understood the RFC, it seems that a "use client"; directive essentially "poisons" everything in the subtree, yes? That understood, IconBase.tsx, which is the only component referencing useContext and called by every icon, just needs a "use client"; at the top, and we force this code into the client bundle. Correct me if I'm wrong about that.

It would be really nice, although maybe quite complex, if we had some sort of conditional directive to allow different behaviors on server- and client-side, a la:

let defaultValues = { size, weight, color, mirrored };
"if client";
defaultValues = useContext(IconContext);
"endif";

from react.

thewinger avatar thewinger commented on April 21, 2024

Is there an update?
I see a PR, tried to installed it with Yarn to try it but couldn't, don't know why.

from react.

dgknca avatar dgknca commented on April 21, 2024

still waiting

from react.

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.