forked from streamich/react-use
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/correct-spelling
- Loading branch information
Showing
41 changed files
with
3,163 additions
and
1,518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,100 @@ | ||
# These are supported funding model platforms | ||
|
||
github: streamich | ||
github: [ | ||
"streamich", | ||
"wardoost", | ||
"xobotyi", | ||
"Belco90", | ||
"ankithkonda", | ||
"ayush987goyal", | ||
"NullVoxPopuli", | ||
"lintuming", | ||
"Granipouss", | ||
"ythecombinator", | ||
"james2406", | ||
"jakapatb", | ||
"MrHuangJser", | ||
"zaguiini", | ||
"ppeeou", | ||
"liuyuchenzh", | ||
"brickspert", | ||
"artywhite", | ||
"PetterIve", | ||
"realdennis", | ||
"lvl99", | ||
"gelove", | ||
"KusStar", | ||
"xiaoxiangmoe", | ||
"nmccready", | ||
"mattleonowicz", | ||
"kevinnorris", | ||
"dubzzz", | ||
"dependabot[bot]", | ||
"ShizukuIchi", | ||
"ManojBahuguna", | ||
"Jivings", | ||
"Dosant", | ||
"zsh2401", | ||
"xiaoboost", | ||
"revskill10", | ||
"mtinner", | ||
"monkeywithacupcake", | ||
"mitchheddles", | ||
"maxzitron", | ||
"macinjoke", | ||
"jeetiss", | ||
"ilyalesik", | ||
"hijiangtao", | ||
"f", | ||
"elliottsj", | ||
"droganov", | ||
"denysdovhan", | ||
"dabuside", | ||
"benneq", | ||
"azukaar", | ||
"ariesjia", | ||
"andrico1234", | ||
"adesurirey", | ||
"OBe95", | ||
"FredyC", | ||
"Cretezy", | ||
"zyy7259", | ||
"zslabs", | ||
"vinitsood", | ||
"uxitten", | ||
"thevtm", | ||
"tanem", | ||
"suyingtao", | ||
"srph", | ||
"rkostrzewski", | ||
"qianL93", | ||
"o-alexandrov", | ||
"nucleartux", | ||
"natew", | ||
"maxmalov", | ||
"liaoyinglong", | ||
"koenvanzuijlen", | ||
"josmardias", | ||
"jeemyeong", | ||
"jazzqi", | ||
"jakyle", | ||
"jakeboone02", | ||
"inker", | ||
"glarivie", | ||
"garrettmaring", | ||
"dovidweisz", | ||
"daniel-hauser", | ||
"d-asensio", | ||
"charlax", | ||
"TylerR909", | ||
"Rogdham", | ||
"OctoD", | ||
"MajorBreakfast", | ||
"Jfelix61", | ||
"Flydiverny", | ||
"FlickerLogicalStack", | ||
"DmacMcgreg", | ||
"Dattaya", | ||
"Andrey-Bazhanov", | ||
"AlvaroBernalG" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# `useHash` | ||
|
||
React sensor hook that tracks browser's location hash. | ||
|
||
## Usage | ||
|
||
```jsx | ||
import {useHash} from 'react-use'; | ||
|
||
const Demo = () => { | ||
const [hash, setHash] = useHash(); | ||
|
||
useMount(() => { | ||
setHash('#/path/to/page?userId=123'); | ||
}); | ||
|
||
return ( | ||
<div> | ||
<div>window.location.href:</div> | ||
<div> | ||
<pre>{window.location.href}</pre> | ||
</div> | ||
<div>Edit hash: </div> | ||
<div> | ||
<input style={{ width: '100%' }} value={hash} onChange={e => setHash(e.target.value)} /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
``` | ||
|
||
## API | ||
|
||
`const [hash, setHash] = useHash()` | ||
|
||
Get latest url hash with `hash` and set url hash with `setHash`. | ||
|
||
- `hash: string`: get current url hash. listen to `hashchange` event. | ||
- `setHash: (newHash: string) => void`: change url hash. Invoke this method will trigger `hashchange` event. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.