Giter VIP home page Giter VIP logo

battle-simulator's Introduction

Battle Simulator

To setup this project, pull and run yarn install then run yarn start to build locally.

Alternatively this is hosted on netlify: https://lucid-hypatia-1858f7.netlify.app/

In order to make the components more reusable, I've stripped back the selectors to the top level. However, this does mean on occassion you might pass a prop two levels deep. IMO, this is an OK approach, any further you'd want the state selector lower down the chain.


React Typescript Template

An opinionated Typescript Create React App (CRA) template. This template was designed to have a good starting point for web app development in Typescript with React.

###Component generation Components can be created quickly with the relevant files for testing, styles and exports using the generate-react-cli commands. npx generate-react-cli component NewPage --type=page npx generate-react-cli component Box

####Redux Toolkit Redux toolkit is the choice for state management, although never required. Redux Toolkit includes wrappers for boilerplate redux code and benefits like redux thunk and immer. Redux-logger is added as middleware example. Defined type hooks are pre-created Defined Type Hooks. Instead of using useDispatch and useSelector you can use useAppDispatch and useAppSelector which will save from copying RootState everywhere.

####React Router React router is added as the primary routing for the template. It is standalone and the route information is not sync'd with Redux as it is not necassary.

Our recommendation is not to keep your routes in your Redux store at all. More information

####Styled Components Styled components is added for all the css generation following the CSS-in-JS approach. An example styled theme is added with the necassary types.

####Eslint and prettier Used for formatting and linting code. Rules can be updated as required.

####Jest & React Testing library Jest is installed and configured with relevant transformers and jest-styled-components for snapshot generation. React Testing library is configured for all unit testing.

####Framer Motion Added for animation.

####Additional Helpers classnames: Useful for conditional classname information in react.

var btnClass = classNames({
  btn: true,
  'btn-pressed': this.state.isPressed,
  'btn-over': !this.state.isPressed && this.state.isHovered,
});

react-helmet: adjusting html/head objects, for example setting page titles husky: build hooks

#####Additional Notes These packages are not included both worth noting. No library is used for end to end testing, although this could be configured with puppeteer if required. cra-bundle-analyzer could be used for analyzing bundle size. source-map-explorer useful for debugging code bloat.

battle-simulator's People

Contributors

ved-stuartmorris avatar

Watchers

James Cloos avatar Stuart Morris avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.