Skip to content

Instantly share code, notes, and snippets.

something need to do

louis.luo wildfrontend

something need to do
  • DG
  • Taichung
View GitHub Profile
wildfrontend /
Last active Sep 30, 2020
How to use bulma tabs active class name on the parent element with React router



  const setParentAsActive = (node: any) => {
    if (node) {
 node.parentNode.className = node.className
wildfrontend / why we dont need to use
Last active Sep 11, 2020
why we dont need to use `npm install --save-dev`
View why we dont need to use

As of NPM 5, saving is done by default

--save-dev is only needed if we’re building a node app;

since we output minified JS for production via npm run build, everything is a dev dependency,

so it doesn’t actually matter in practice whether modules are added to dependencies or devDependencies in package.json.

View Why closing a page does not unmount the


  • rewrite fetch to catch httpcode
const httpCodeFetch = async ({ url, config = initialConfig }) => {
    const res = await fetch(url, config)
    if (res.status === 204) return {}
    if (res.ok) {
 return res.json()


  1. add in
  2. add Global 404
Hey guys, so today I've came across this exact same issue and I was able to get something working to render a "global not found" component, while keeping the benefits of sharing some UI within a "parent" route. I wanted to share this with you, in case you find this useful for your case :)

Consider the routes I need to support:
wildfrontend / AppendComponent.js
Created Jul 16, 2020
create dymanic component
View AppendComponent.js
const App = () =>{
const [conunt,setConunt] = useState(1)
return (
View blobToDataURI.js
function blobToDataURI(blob, callback) {
const reader = new FileReader()
reader.onload = function (e) {
wildfrontend /
Created Jun 5, 2020
tailwind.css with css-in-jss , react setup