Giter Site home page Giter Site logo

catalinmiron / react-typical Goto Github PK

View Code? Open in Web Editor NEW
991.0 8.0 66.0 3.61 MB

React typing animation in ~400 bytes 🐡 of JavaScript.

Home Page: https://catalinmiron.github.io/react-typical

HTML 45.81% JavaScript 48.27% CSS 5.92%
react typing animation javascript typical react-typical

react-typical's Introduction

react-typical

React Animated typing in ~400 bytes 🐡 of JavaScript.

DEMO

React Typical

Based on awesome typical library by @camwiegert

NPM JavaScript Style Guide

React-Typical - Animated typing without the headaches

Youtube Video Tutorial

react-typing-indicator-thumbnail-v2

Install

npm install --save react-typical

Usage

import React, { Component } from 'react'
import Typical from 'react-typical'

class Example extends React.Component {
  render () {
    return (
      <Typical
        steps={['Hello', 1000, 'Hello world!', 500]}
        loop={Infinity}
        wrapper="p"
      />
    )
  }
}

Properties

prop mandatory type Eg.
steps yes [] ['Hello', 1000, 'World']
wrapper no string 'p'
loop no number 3

License

This library is based on @camwiegert/typical work and it currently is just a wrapper for react.

MIT © catalinmiron

react-typical's People

Contributors

catalinmiron avatar jordan-t 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  avatar  avatar  avatar  avatar  avatar  avatar

react-typical's Issues

Unable to install it with latest node version

"25 silly fetch manifest react-typical@*
26 http fetch GET 200 https://registry.npmjs.org/react-typical 19ms (from cache)
27 silly fetch manifest prop-types@^15.5.4
28 http fetch GET 304 https://registry.npmjs.org/prop-types 1202ms (from cache)
29 silly fetch manifest react@^17.0.1
30 http fetch GET 304 https://registry.npmjs.org/react 243ms (from cache)
31 silly fetch manifest react@^15.0.0 || ^16.0.0"
"40 error code ERESOLVE
41 error ERESOLVE unable to resolve dependency tree"

re-render issue

The component re-render but no props changed.

Can we add memo for prevent re-render issue ?

Typical

Hi bro
When i install the typical it show found 0 vulnerabilities
And when i reunn my project nothing show in browser

Make compatible with TypeScript

I was recently making a site using TSX an i wanted to use react-typical but when tried to install @types/react-typical it was not finding that module, so i guess they didn't made it yet.

Forward props to wrapper

I want to use this lib to add typing to an anchor tag, but if I set a as the wrapper, I can't pass the href to react-typical component to be forwarded to the underlying wrapper. I'm working around this currently by nesting a span under the react-typical component but was wondering if you'd be interested in a PR to forward those props.

Adapt to current version of react

While installing react-typical using the react version 17.0.2, I stumbled upon the following error, it seems that your library needs an older version of react/NPM to function properly. So I need to downgrade my package so it can works fine.
any other solution would be appreciated.
personal_portfolio

I am unable to install this dependecies with the latest recommended node

This is what I have been seeing.

$ npm i react-typical
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0 || ^16.0.0" from [email protected]
npm ERR! node_modules/react-typical
npm ERR! react-typical@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Joseph Edemekong\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Joseph Edemekong\AppData\Local\npm-cache_logs\2021-07-10T06_49_03_998Z-debug.log

Error: React.useRef is not a function

Getting error trying to use simple use case.

Typescript throwing error when trying to import Typical

Could not find a declaration file for module 'react-typical'. 'd:/Websites/AAG Innovations/V3/aag-innov-v3-0/node_modules/react-typical/dist/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/react-typical if it exists or add a new declaration (.d.ts) file containing declare module 'react-typical';ts(7016)

同学,您这个项目引入了1007个开源组件,存在34个漏洞,辛苦升级一下

检测到 catalinmiron/react-typical 一共引入了1007个开源组件,存在34个漏洞

漏洞标题:yeikos js.merge 安全漏洞
缺陷组件:[email protected]
漏洞编号:CVE-2020-28499
漏洞描述:yeikos js.merge是美国Yeikos个人开发者的一个应用软件。提供了合并js工具。
yeikos js.merge 中存在安全漏洞。该漏洞源于所有相关分支的合并都容易受到该代码库的原型影响。以下产品及版本受到影响:yeikos js.merge
影响范围:(∞, 2.1.1)
最小修复版本:2.1.1
缺陷组件引入路径:[email protected]>[email protected]>[email protected]>[email protected]>[email protected]>[email protected]

另外还有34个漏洞,详细报告:https://mofeisec.com/jr?p=aec87b

Cleanup function

If you using useEffect please return cleanup function otherwise component get bugged.

Can't Install the Library

PS F:\React JS\inshalayaz> npm install --save react-typical
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0 || ^16.0.0" from [email protected]
npm ERR! node_modules/react-typical
npm ERR! react-typical@"*" from the root project
npm ERR!
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\insha\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\insha\AppData\Local\npm-cache_logs\2021-06-21T19_33_47_256Z-debug.log

Every rerender causes a new instance to be attached

I am using react-scroll-parallax and I am seeing an issue where if it rerenders on scroll in my case, a new instance of typical is attached to the element resulting in very janky visuals.

Screen.Recording.2022-06-01.at.11.00.19.AM.mp4

Edit: Wrapping it in a PureComponent fixes the issue, but I feel like I shouldn't need to do this.

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.