GithubHelp home page GithubHelp logo

estudos-react's Introduction

instalando yarn linux curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt update sudo apt install yarn

video tutorial https://www.youtube.com/watch?v=aQFPetOyzUE&t=873s documentaçao e exemplos sobre next https://github.com/zeit/next.js/

server-side rendering:

  • tras mais performance, permite que utilize o SEO fazendo com que a pagina seja indexada

observacao:

  • quando não é o primeiro acesso, o react so executa o lado front, porém mesmo com o js desabilitado a pagina é carrega, trazendo problema apenas para os state

instalando react e o next

  • npm init -y = inicializa packge json do node
  • npm install pm2 -g = instala pm2
  • yarn add react react-dom next
  • yarn add isomorphic-fetch = biblioteca que estabiliza api no front e no back
  • yarn add pm2 -g = instala gerenciador de processos

scripts:

  • "pm2_dev": "pm2 start server/server.js", => EXECUTA SERVER COM O PM2
  • "dev": "node server/server.js", => EXECUTA O SERVIDOR
  • "build": "next build", => COMPILA APP OTIMIZANDO PARA PROD.
  • "start": "node server/server.js start" => STARTA O COMPILADO

estudos-react's People

Contributors

jeffersonnunesfonseca avatar

Stargazers

Igor Davoli avatar

Watchers

James Cloos avatar  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.