Giter VIP home page Giter VIP logo

nwitter's Introduction

Nwitter

Twitter (mini)clone with React and Firebase

nwitter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nwitter's Issues

[Error on input type file]choose file canceled

There are two supplements about when 'choose file' is canceled.

[1] the reader cannot read null as dataUrl, should be better to add condition like,

if(theFile) {
  reader.readAsDataURL(theFile)
}

[2] when clear button is clicked, the value of this input[type=file] should be initialized in the function onClearAttachment like,

document.querySelector('input[type=file]').value = ''

Please reply better solution.

[Not Show Log out button and other Error]

I can't start lecture #5.0 because error("not change My profile Page show log out button") and history() error...

Before I did
$ npx create-react-app nwitter
$ npm i [email protected]
$ npm i [email protected]
$ npx create-react-app nwitter
$ npm install react react-dom
$ npm install uuid

Different file is Router.js..

https://github.com/nomadcoders/nwitter/commit/c957fa1bb4d7e92c21121998952109034f68a3f9

image
image

"dependencies": { "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.2.0", "@testing-library/user-event": "^13.5.0", "firebase": "^9.6.1", "react": "^18.1.0", "react-dom": "^18.1.0", "react-router-dom": "^5.3.0", "react-scripts": "5.0.1", "uuid": "^8.3.2", "web-vitals": "^2.1.4" },

Thank you for always.

[Error on FirebaseStorage delete]invalid argument

[Issue description]
If nweet doesn't have an attachment image url, delete nweet shows error like this,

"Firebase Storage: Invalid argument in refFromURL at index 0: Expected full URL but got a child path, use ref instead."

So, it need to delete nweet with condition about attachment url like,

if (nweetObj.attachmentUrl) {
  await storageService.refFromURL(nweetObj.attachmentUrl).delete()
}

If there are better solution, please leave a comment.

[Memory leak]setState in React.useEffect with async task

The browser alert that if async task in callback(include setState) of React.useEffect is fired after component unmount(kind of log out), then there is a memory leak possibility. I think it'd be better to prevent it via conditional setState(by returning a clean up function of useEffect) like below.

useEffect(() => {
  let isMount = true

  if(isMount) {
    setNweets(nweetArray)
  }

  return () => isMount = false
}, [])

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.