• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "react". Back to normal view
    1. Yarn, React, and Udemy. Help requested.

      My apologies if this kind of content is not allowed here. Mod(s) please feel free to delete it if it is not without any butthurt on my part. I'm new to React Testing, so I am taking an Udemy...

      My apologies if this kind of content is not allowed here. Mod(s) please feel free to delete it if it is not without any butthurt on my part.

      I'm new to React Testing, so I am taking an Udemy course on it. The Udemy course uses yarn, so I would like to stick with that though I do know yarn isn't the top accepted tool in the React community.

      I've posted this question elsewhere, I haven't gotten any responses, so I am posting it here ( costs nothing ).

      I am getting this error when executing yarn build:

      $ yarn build
      yarn run v1.22.22
      $ react-scripts build
      Creating an optimized production build...
      Failed to compile.
      
      TS2305: Module '"web-vitals"' has no exported member 'ReportHandler'.
        > 1 | import { ReportHandler } from 'web-vitals';
            |          ^^^^^^^^^^^^^
          2 |
          3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => {   
          4 |   if (onPerfEntry && onPerfEntry instanceof Function) {      
      
      
      error Command failed with exit code 1.
      

      I've tried installing web-vitals over what is already in the modules section, but that hasn't helped.

      Any clues appreciated!


      Update: the tip about ReportHandler being deprecated helped. I ran create react app in a new folder, did NOT run yarn update as the instructor called for,moved my work over, and now everything runs fine.


      7 votes
    2. React: Some comments from a beginner

      New job. I've been wanting to learn something new for a while, so I took a project where a lot of React is done. I'm learning it from scratch while I work with React. I have some comments about...

      New job. I've been wanting to learn something new for a while, so I took a project where a lot of React is done. I'm learning it from scratch while I work with React.

      I have some comments about it.

      1. React makes front end work a lot more like programming -- I like that!
      2. Javascript has changed a lot, and for the better, since I last used it over a decade ago.
      3. The React-Redux tool kit is the bomb. It should be integrated/absorbed into React. I can't see any reason not to use it, even for small applications as it is less wordy wherever you use it.
      4. The updating of state values should be more automatic, especially for flag variables not tied to GUI components. It is the major source of hassles with React
      5. Udemy React videos. My company makes them available free of charge to employees. I've sampled videos from a number of courses. I'm not a fan of the instructors showing you how to do things in older, less efficient ways first in a learning/demo project, the ERASING that code to do it a better way. The should include copies of the project at each stage if they do that. I finally figured out that the best way to take notes I can use later is to comment out the old code and put the new more efficient next stage stuff on top.
      6. React tests really need to improve. They are often more time consuming than the code itself. The tests have forced me to change my code or do needless testing to get the tests to pass. I had one situation where no matter what I did React test said I didn't cover the code until I broke an else clause off into it's one if clause. Blech.

      All in all I've been enjoying learning React. It is neat new ( to me ) thing.

      I feel sad that I will likely forget it all when I go back to my specialty language.

      16 votes
    3. I started a React and React Native screencast, I'd love to get your opinion on it

      I have always believed that sharing what you know is very important. Altruistically, it helps create a wealth of knowledge that anyone can build upon. Selfishly, it creates a knowledge-base for...

      I have always believed that sharing what you know is very important.

      Altruistically, it helps create a wealth of knowledge that anyone can build upon.

      Selfishly, it creates a knowledge-base for your future self, and - arguably more importantly - helps you build a following.

      After years of pondering on the idea, I took the plunge and started a screencast on React and React Native. I only published four episodes so far, and they are all very basic, but I'm planning on publishing a video every other day for a few months at least.

      It's called RNcasts. You can see it here. I would love to get your opinion on it.

      It's by no means perfect, it hurts my eyes to look at it, and it hurts my ears to hear my own voice, but I had to get started somewhere.

      Also, I will be sharing my journey of working on this screencast on the RNcasts blog. If you are interested in starting your own screencast or video course, feel free to follow it. I'm hoping to share all I learn, the good and the bad.

      4 votes
    4. I made a post awhile back about asking for inspiration for a new project. I built a thing.

      hey all! i made a post awhile back talking about how i was in a tech rut, and tired of creating the same things over and over again, working with the same libraries and the same frameworks. i was...

      hey all!

      i made a post awhile back talking about how i was in a tech rut, and tired of creating the same things over and over again, working with the same libraries and the same frameworks.

      i was bored of it!

      so last week i said hell with it and i spent more money than i should've on udemy courses, learned a lot about javascript and the mern stack (mongodb, express.js, react, node.js)

      then, after a few nights of staying up way later than i should have (i have presently been awake for 27 hours) i built this thing:

      https://dry-castle-80238.herokuapp.com/dashboard

      dev-connector.

      a small little social media site for the technically-minded.

      nothing groundbreaking or super fancy - just a basic social media site with posts, comments, user profiles and all that. but it's the first thing in awhile that i've actually finished and put into production on some capacity (even if it's just heroku)

      jump in, leave a few comments, and let me know what you think. :)

      passwords are hashed with bcryptjs, but i've been recommending everyone just use fake login info on sign up for safety's sake.

      12 votes