aromalanil / usecustomhooks Goto Github PK
View Code? Open in Web Editor NEW๐ฆ npm package containing a set of custom hooks for your next React project.
Home Page: https://www.npmjs.com/package/use-custom-hooks
License: MIT License
๐ฆ npm package containing a set of custom hooks for your next React project.
Home Page: https://www.npmjs.com/package/use-custom-hooks
License: MIT License
A hook which returns the current coordinates of the mouse pointer, as a state.
A custom hook which returns a stack, push and pop function.
Currently, the documentation for every hooks are added to the README file. This can get complex as the number of hooks in the package increases.
We should move these to a new location. A separate doc section would help. Please share your suggestion on how to solve this.
Need to add more custom hooks to this repo.
Add a table in README to feature all the contributors
Since the package already contains a useStack
hook, it would be great to have a useQueue
hook.
useStack
but for Queue data structure.PRs are welcome ๐
A hook which will return a boolean state and a toggle function.
The toggle function should set the state to its negation.
Describe the hook
A hook to get the latitude and longitude
Additional context
Create a hook to get the current position from the browser.
import React from "react"
import useGeolocalisation from "useGeolocalisation"
const Home = () => {
/*
* The hook will return you an object like this:
*
* {
* latitude: 1233234,
* longitude: -1234345,
* }
*
*/
const [geolocalitation] = useGeolocalisation(true);
return (
<div>
{geolocalitation.latitude}
{geolocalitation.longitude}
</div>
);
}
The documentation for the hooks are not complete. Only useLocalStorage
hook has complete documentation. Other hooks does not contain Parameters and Return values in their documentation
Add parameters and return values to the docs of all other hooks
A hook which will return a dark state and set dark state function.
The hook should add a class name to the body when dark mode.
import {useDarkMode} from "useDarkMode"
const App = () =>{
const [darkMode,setDarkMode] = useDarkMode(true,"dark")
//This should add a class name .dark to the body if it is dark mode.
return <div></div>
}
The repo currently has 2 templates for issues, but it lacks an issue template for general issues and documentation issues.
Add templates for PRs and Issues. Also, suggest improvements for the current issue templates.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.