click below
click below
Normal Size Small Size show me how
INTPROG - L3
Introduction to ReactJS
| Question | Answer |
|---|---|
| A free and open-source Front-End JavaScript library. | ReactJS? |
| A framework that allows developers to build user interfaces(UI) based on components. | ReactJS |
| React JS is created by? | Jordan Walke |
| How to Install ReactJS? | Download and Install Node.js Download Simple React Snippets |
| On the terminal type: | npx create-react-app <filename> |
| To run the the default react file. | cd <filename> Type npm start |
| a reusable piece of code representing a part of the user interface. | components |
| can be nested within other components, allowing for complex UIs to be built from simple, isolated pieces. | components |
| a simple function that returns the h1 tag. | function SampleComp1(){ return <h1> Hello my name is Cristine </h1> } export defaults SampleComp1; |
| Stands for ‘properties’ | props |
| It is a way to pass data from a parent component to a child component. | props |
| Read-only means that the child component cannot modify the props it receives. | props |
| how props are used when passing data from the parent component to the child component. | function SampleComp1 (props){ return <h1> Hello my name is {props.name} </h1> } export default SampleComp1 |