Spaces:
Running
Running
export const messageDatabase = [ | |
{ | |
user: "What is React?", | |
llm: "React is a JavaScript library for building user interfaces.", | |
type: 0 | |
}, | |
{ | |
user: "How do components work?", | |
llm: "Components in React are like building blocks. They encapsulate both the UI elements and their behavior.", | |
type: 1 | |
}, | |
{ | |
user: "What are hooks?", | |
llm: "Hooks are functions that allow you to use state and other React features in functional components.", | |
type: 0 | |
}, | |
{ | |
user: "Explain useState hook", | |
llm: "useState is a React hook that lets you add state variables to functional components.", | |
type: 0 | |
}, | |
{ | |
user: "What is the virtual DOM?", | |
llm: "Virtual DOM is a programming concept where an ideal, or 'virtual', representation of a UI is kept in memory and synced with the 'real' DOM by a library such as ReactDOM.", | |
type: 1 | |
}, | |
{ | |
user: "What are props in React?", | |
llm: "Props are inputs that allow you to pass data from parent to child components.", | |
type: 0 | |
}, | |
{ | |
user: "Explain React lifecycle", | |
llm: "React components go through mounting, updating, and unmounting phases, with various methods called at each stage.", | |
type: 1 | |
}, | |
{ | |
user: "What is JSX?", | |
llm: "JSX is a syntax extension for JavaScript that allows you to write HTML-like code within JavaScript.", | |
type: 0 | |
}, | |
{ | |
user: "What is state management?", | |
llm: "State management refers to the handling and organization of data within an application, often using tools like Redux or Context API.", | |
type: 1 | |
}, | |
{ | |
user: "What are controlled components?", | |
llm: "Controlled components are form elements whose values are controlled by React state.", | |
type: 0 | |
} | |
]; | |