GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - denisos/mixopedia: A mix of libraries and code including react-intl, react-router-dom, flexbox, redux hooks etc

BranchesTags
Open more actions menu

Latest commit

 

History

34 Commits
34 Commits

Folders and files

NameName
Last commit message
Last commit date
public
public
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.nvmrc
.nvmrc
 
 
README.md
README.md
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

mixopedia

An app built with various common react tech: react-intl, react-router-dom, flexbox, redux hooks, typescript, setup with a particular folder structure, code splitted by webpack and React.lazy() etc.

Install and run

install

nvm use

yarn

run

yarn start

Open http://localhost:3000 to view it in the browser.

hot reloads

test

yarn test

Launches the test runner in the interactive watch mode.\

build

yarn build

Builds the app for production to the build folder.\

This is a bootstrapped create react app so all the usual applies with that

Code splitting

Scaffolded as a create-react-app which uses react-scripts webpack config which is already configured with "chunkFilename" property.

chunkFilename: isEnvProduction ? 'static/js/[name].[contenthash:8].chunk.js' : isEnvDevelopment && 'static/js/[name].chunk.js',

I use React.lazy() to load the PokemonPowerRankings component:

const PokemonPowerRankings = React.lazy(() => import(/* webpackChunkName: "PokemonPowerRankings" */ './components/pokemon/PokemonPowerRankings'));

Lastly wrap React.lazy() components in React.Suspense

The behavior of this code splitting is:

  1. at build time the PokemonPowerRankings component (css & js)is bundled as a separate component names based on chunkFileName property (yarn build will create the code bundles in /build/static)
  2. at runtime the PokemonPowerRankings component is loaded on demand when the user navigates to that route

See more in webpack docs

About

A mix of libraries and code including react-intl, react-router-dom, flexbox, redux hooks etc

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.