Giter Club home page Giter Club logo

neoconfetti's Introduction

Hi there ๐Ÿ‘‹

Puru Vijay's Most used languages

neoconfetti's People

Contributors

andreasmcdermott avatar arnaudlier avatar dejaydev avatar github-actions[bot] avatar leodog896 avatar puruvj avatar tanhauhau avatar

Stargazers

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

Watchers

 avatar  avatar

neoconfetti's Issues

Incompatible with Next.js

Hi,

Though the README for @neoconfetti/react reads "Works seamlessly in NextJS/Remix/Gatsby/Redwood and other Server Side Rendering environments!"

Adding the Confetti import to a Server Side Rendered page provides the error:

node_modules/@neoconfetti/react/dist/index.js (211:28) @ Confetti
useRef only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/react-client-hook-in-server-component

In most cases it's possible to just add "use client", but in apps that need to also be defining page metadata it becomes impossible to use this library and set things like the page title/opengraph data.

For example,

import { Confetti } from '@neoconfetti/react';
import { Metadata } from "next";

const metadata: Metadata = {
  title: "Happy Page!",
}

function HappyPage() {
  return (
    <div>
      <Confetti/>
    </div>
  )

}

export default HappyPage;
export { metadata };

You're forced to choose between Confetti (client component) and metadata (server component) โ˜น๏ธ

This is with [email protected] and @neoconfetti/[email protected]

[Expanding scope] Using one or more img(s) as confettis

Hi Puru,

Nice library and amazing work as usual

I didn't know that I needed this library until I played with the svelte REPL. I don't quite understand how the particles are generated, but reading through the code I see that you limited to a few shapes for particles.

My question, is if I wanted to changed the particle to be one or more images where should I start? Essentially the confettis would be images. I feel that this option will negatively affect performance should the user go a bit too crazy with the images

Thank you for reading,

onComplete

Add an onComplete property. Vanilla should still support this as well as explode: Promise

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.