View axe-setup.js
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
// Disable in production | |
if (process.env.NODE_ENV !== 'production') { | |
var axe = require('react-axe'); | |
axe(React, ReactDOM, 1000); |
View component-page-title.js
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
// Disable in production | |
if (process.env.NODE_ENV !== 'production') { | |
var axe = require('react-axe'); | |
axe(React, ReactDOM, 1000); |
View component-page-title.js
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
import React from 'react'; | |
import usePageTitle from 'hooks/usePageTitle'; | |
const ListPage = ({ items = [] }) => { | |
usePageTitle('List of items'); | |
return ( | |
<div className="list-component"> | |
<ListTitle title="List component" /> |
View use-page-title.js
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
import React from 'react'; | |
const usePageTitle = title => { | |
useEffect(() => { | |
document.title = title; | |
}, [document]); | |
}; | |
export default usePageTitle; |
View example-accessibility-2.html
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
<div class="list-component"> | |
<div class="list-title"> | |
<span>List component</span> | |
</div> | |
<div class="list-component-items"> | |
<span>List item 1</span> | |
<span>List item 2</span> | |
</div> | |
</div>; |
View example-accessibility-2.js
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
import React, { Fragment } from 'react'; | |
const ListItem = ({ item }) => ( | |
<Fragment> | |
<span>{item}</span> | |
</Fragment> | |
); | |
// Try to avoid index as key's |
View example-accessibility.html
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
<div class="list-component"> | |
<div class="list-title"> | |
<span>List component</span> | |
</div> | |
<div class="list-component-items"> | |
<div> | |
<span>List item 1</span> | |
</div> |
View example-accessibility.jsx
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
import React from 'react'; | |
const ListItem = ({ item }) => ( | |
<div> | |
<span>{item}</span> | |
</div> | |
); | |
const List = ({ items = [] }) => ( | |
<div className="list-component"> |
View react-query-basic-demo-mutation.js
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
const { status, data, error } = useQuery('movies', fetchTodoList); |
NewerOlder