Skip to content

Simplify the task of manipulating the DOM of the react components and use animations (like jQuery)

License

Notifications You must be signed in to change notification settings

bonarja/react-sdom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-sdom GitHub license NPM version

react-sdom is an extension to access the React DOM using references, it returns a ref object with the extra functions of sdom, simplifying the task of manipulating the html DOM and are similar to the most common functions of the old jQuery, all this in a simpler and lighter script summarizing only the essential and more useful.

react-sdom Includes functions to animate the DOM using animate.css as a promise and ajax request.


check the complete documentation in the following link

import React from "react";
import { Sdom } from "react-sdom";

class Home extends React.Component {
    title = Sdom(); // get Sdom ref h1

    componentDidMount() {
        // use Sdom ref
        this.title
            .css({
                color: "coral",
                textTransform: "uppercase"
            })
            .in("bounceIn", 700)
            .then(() => {
                console.log("finished animation");
            });
    }

    render() {
        return (
            <div>
                <h1 ref={this.title}>hello</h1>
            </div>
        );
    }
}
export default Home;

About

Simplify the task of manipulating the DOM of the react components and use animations (like jQuery)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published