Skip to content

Tic Tac Toe React Application build as part of Internshala React Traning projects

Notifications You must be signed in to change notification settings

Prashant-17-11/TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe

This Repo is build under the Intrenshala React Training projects.

  • As part of training I have built a single page react application of two player Tic Tac Toe
  • Deployed in on surge server at https://tictactoefun.surge.sh/
  • In this training I learnt the fundamentals of components, modules, props, hooks, events, lifecycle events, dynamic styling in react and many other features of react apps from handling state of functions to updating and manipulating them to serve our purpose
  • was also introduced to SASS preprocessor and Surge server for deploying of baisc frontend web apps

The following info is copy from the git repo of the template file for the react app.

Nano React App Default Javascript Template

The default template project for nano-react-app.

  • npm start — This will spawn a development server with a default port of 1234.
  • npm run build — This will output a production build in the dist directory.

Custom port

You can use the -p flag to specify a port for development. To do this, you can either run npm start with an additional flag:

npm start -- -p 3000

Or edit the start script directly:

parcel index.html -p 3000

Adding styles

You can use CSS files with simple ES2015 import statements anywhere in your Javascript:

import "./index.css";

Babel transforms

The Babel preset babel-preset-nano-react-app is used to support the same transforms that Create React App supports.

The Babel configuration lives inside package.json and will override an external .babelrc file, so if you want to use .babelrc remember to delete the babel property inside package.json.

Deploy to GitHub Pages

You can also deploy your project using GitHub pages. First install the gh-pages package:

npm i -D gh-pages

With Parcel's --public-url flag, use the following scripts for deployment:

"scripts": {
  "start": "parcel index.html",
  "build": "parcel build index.html --public-url '.'",
  "predeploy": "rm -rf dist && parcel build index.html --public-url '.'",
  "deploy": "gh-pages -d dist"
},

Then follow the normal procedure in GitHub Pages and select the gh-pages branch.

About

Tic Tac Toe React Application build as part of Internshala React Traning projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published