function Box() {
return (
<>
<p>Box Component</p>
</>
);
}
function List({Component}) {
return (
<>
<Component/>
</>
);
}
function App() {
return (
<List Component={Box}/>
);
}
export default App;
function List({component: Component}) {
try {
const response = await usersPassportLogin(usersPassportLoginBody, options);
// Успешный ответ обрабатывай как обычно
console.log('Login successful:', response);
} catch (error) {
// Здесь мы проверим, является ли ошибка ValidationError
if ((error as ValidationError).errors) {
const validationError = error as ValidationError;
console.log('Validation Error:', validationError.errors);
} else {
console.log('Unexpected Error:', error);
}
}
docker compose run --user $(id -u):$(id -g) composer create-project laravel/laravel .
FROM composer:latest
WORKDIR /var/www/laravel
RUN adduser -D -u USER www-data
USER www-data
ENTRYPOINT ["composer", "--ignore-platform-reqs"]
React assumes that every component you write is a pure function. This means that React components you write must always return the same JSX given the same inputs (props, state, and context).https://react.dev/reference/react/StrictMode#fixin...
Components breaking this rule behave unpredictably and cause bugs. To help you find accidentally impure code, Strict Mode calls some of your functions (only the ones that should be pure) twice in development.
Since Next.js 13.4, Strict Mode is true by default with app router. You can still disable Strict Mode by setting reactStrictMode: false.https://nextjs.org/docs/app/api-reference/next-con...
type Keys = 'line' | 'abzac' | 'text'
type IEX = Record<string, string>
type AntiKey = IEX & Partial<Record<Keys, never>>
// or
type AntiKey = IEX & { [Key in Keys]?: never }
// валидное значение
let znac: AntiKey = {
oneline: 'anytext',
otherline: 'othertext'
}
// невалидное
let er: AntiKey = {
text: 'no',
other: 'txt'
}
<div id="vueapp1"></div>
<div id="vueapp2"></div>
<div id="vueapp3"></div>
Vue.createApp(VueApp).mount('#vueapp1')
...