Skip to content

Instantly share code, notes, and snippets.

@AllanSaleh
Last active November 22, 2022 15:41
Show Gist options
  • Save AllanSaleh/4f0ca0feb2e3fc81a98e57cfd76c42aa to your computer and use it in GitHub Desktop.
Save AllanSaleh/4f0ca0feb2e3fc81a98e57cfd76c42aa to your computer and use it in GitHub Desktop.
  1. Each person in your group should take one of the following topics and explain it to the group in their own words. Be sure to provide concrete examples in your explanations. For the remaining topics, discuss them as a whole group.
  • Node Package Manager
  • Imperative vs Declarative
  • Components
  • JSX
  • Imports and Exports
  • Props
  1. When would you use props in react?
  2. Assuming UserDetail is a component, what will it's props be if it's rendered as follows:
const user = {name: 'Spider Man', age: 32}

<UserDetail title="Profile Page" dog="Fido" user={user} />
Copy link

ghost commented Nov 22, 2022

  1. --npm is the default package manager for the JavaScript runtime environment Node.js.
    --The export declaration is used to export values from a JavaScript module. Exported values can then be imported into other programs with the import declaration or dynamic import. The value of an imported binding is subject to change in the module that exports it — when a module updates the value of a binding that it exports, the update will be visible in its imported value.
    ---props get passed to the component (similar to function parameters) whereas state is managed within the component (similar to variables declared within a function)

  2. make components reusable by giving components the ability to receive data from their parent component in the form of props.

  3. Profile Page Fido 'Spider Man' 32.

@halilibrahimcelik
Copy link

  1. NPM is a command line tool that installs, updates or uninstalls Node. js packages in your application.
  2. Imperatives programming is like step by step instruction and Declarative is the instruction.
  3. Components single and reusable fragments of React.
  4. JSX is combination of JS and HTML
  5. Imports and Exports are used for importing and exporting modules for third party languages and tools
  6. props are objects passed through react components

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment