Skip to content

Tag: reactjs

How to setup react properly

I have been following the react setup instructions on codecademy: When I type in “npm run build” into the terminal I get this error: I can’t seem to figure out how to get it to work. Here is the link to my code on my github: https://github.com/throwkill999/react_demo Answer The error tells y…

Gantt editable chart for ReactJs

I’m looking for an editable Gantt chart component that can be used in ReactJS. The need is to plot a resource Gantt chart where the user can change tasks on the time axis and also between the resources. Preferably open source. Answer This one is really good too https://github.com/guiqui/react-timeline-g…

Import styles css into a react js app

i have a trouble importing .css stylesheet on a react basic app, I have this components: AvatarHeader.js: AvatarHeader.css: AvatarHeader.js & AvatarHeader.css are in the same folder. package.json: Styles aren’t applied on the component, but it’s works if I rewrite AvatarHeader.js so: I don&#82…

ESLint with React gives `no-unused-vars` errors

I’ve setup eslint & eslint-plugin-react. When I run ESLint, the linter returns no-unused-vars errors for each React component. I’m assuming it’s not recognizing that I’m using JSX or React syntax. Any ideas? Example: app.js Linter Errors: Here is my .eslintrc.json file: Answer Firs…

How to deploy a React App on Apache web server

I have created a basic React App from https://www.tutorialspoint.com/reactjs/reactjs_jsx.htm here , I want to run this test code on Apache based server, I know that I need to create a distributable build but I am not able to figure out how to do that and couldnt find clear instructions. I have seen this post …

Typescript: React event types

What is the correct type for React events? Initially I just used any for the sake of simplicity. Now, I am trying to clean things up and avoid use of any completely. So in a simple form like this: What type do I use here as event type? React.SyntheticEvent<EventTarget> does not seem to be working as I g…