Merge pull request #574 from wandri/challenge-react-in-angular

feat: add new challenge 45 React in Angular
This commit is contained in:
Laforge Thomas
2024-02-15 17:45:23 +01:00
committed by GitHub
30 changed files with 491 additions and 39 deletions

View File

@@ -0,0 +1,5 @@
{
"name": "Wandrille Guesdon",
"linkedin": "https://www.linkedin.com/in/wandrille-guesdon-53a54684/",
"github": "https://github.com/wandri"
}

View File

@@ -6,7 +6,6 @@ challengeNumber: 44
command: angular-view-transition
sidebar:
order: 208
badge: New
---
## Information

View File

@@ -0,0 +1,77 @@
---
title: 🔴 React in angular
description: Challenge 45 is about learning how to benefit from the numerous libraries in React
author: wandrille-guesdon
challengeNumber: 45
command: angular-react-in-angular
sidebar:
order: 209
badge: New
---
The goal of this challenge is to use a React component inside an Angular application.
Many components are available in React, and it can be interesting to use them in an Angular application. The goal is to create a React component and use it in an Angular application.
## Information
In this challenge, we have a simple application and a react component `ReactPost` in `app/react` to illustrate a react component from a library.
## Statement
- Your task is to display the posts with the React component `ReactPost`.
- When you select a post, the post should be highlighted.
In order to play with the react component, you should start by installing the react dependencies.
```bash
npm i --save react react-dom
npm i --save-dev @types/react @types/react-dom
```
## Constraints
- Do not transform the react component in an angular component. The React component is pretty simple and can be written with ease in Angular. But **the goal is to use the React component**.
### Hint
<details>
<summary>Hint 1 - Configuration</summary>
Allow the React files in tsconfig.json
```
{
...
"compilerOptions": {
...
"jsx": "react"
},
...
}
```
</details>
<details>
<summary>Hint 2 - Initialization</summary>
Create a react root with `createRoot(...)`
</details>
<details>
<summary>Hint 3 - Display</summary>
To render the component, it should look like this:
```
<react root>.render(
<React.StrictMode>
...
</React.StrictMode>
)
```
</details>
<details>
<summary>Hint 4 - Design</summary>
Do not forget to allow the react file in Tailwind.
</details>

View File

@@ -23,16 +23,16 @@ hero:
import { Card, CardGrid } from '@astrojs/starlight/components';
import MyIcon from '../../../components/MyIcon.astro';
import SubscriptionForm from '../../../components/SubscriptionForm.astro'
import SubscriptionForm from '../../../components/SubscriptionForm.astro';
<CardGrid>
<Card title="44 Desafíos">
Este repositorio contiene 44 desafíos relacionados con <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> y <b>Typescript</b>.
<Card title="45 Desafíos">
Este repositorio contiene 45 Desafíos relacionados con <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> y <b>Typescript</b>.
Estos desafíos se resuelven en torno a problemas de la vida real o características específicas para mejorar tus habilidades.
</Card>
<Card title="Suscríbete para ser notificado sobre los últimos retos">
<SubscriptionForm isNote={false} lang="es"/>
<SubscriptionForm isNote={false} lang="es" />
</Card>
<Card title="Conviértete en un Contribuidor de OSS">
@@ -57,7 +57,8 @@ import SubscriptionForm from '../../../components/SubscriptionForm.astro'
</Card>
<Card title="Prepárate para Entrevistas">
Completar estos desafíos te preparará para cualquier desafío técnico que puedas encontrar en un rol de frontend durante las entrevistas.
Completar estos desafíos te preparará para cualquier desafío técnico que
puedas encontrar en un rol de frontend durante las entrevistas.
</Card>
<Card title="Patrocinio">

View File

@@ -25,15 +25,15 @@ hero:
import { Card, CardGrid } from '@astrojs/starlight/components';
import MyIcon from '../../../components/MyIcon.astro';
import SubscriptionForm from '../../../components/SubscriptionForm.astro'
import SubscriptionForm from '../../../components/SubscriptionForm.astro';
<CardGrid>
<Card title="44 Défis">
Ce répertoire rassemble 44 défis liés à <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> et <b>Typescript</b>. Ces défis portent sur des problèmes réels ou des fonctionnalités spécifiques pour améliorer vos compétences.
<Card title="45 Défis">
Ce répertoire rassemble 45 Défis liés à <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> et <b>Typescript</b>. Ces défis portent sur des problèmes réels ou des fonctionnalités spécifiques pour améliorer vos compétences.
</Card>
<Card title="Subscribe to get notify of latest challenges">
<SubscriptionForm isNote={false} lang="fr"/>
<SubscriptionForm isNote={false} lang="fr" />
</Card>
<Card title="Devenir un Mainteneur OSS">

View File

@@ -24,17 +24,16 @@ hero:
import { Card, CardGrid } from '@astrojs/starlight/components';
import MyIcon from '../../components/MyIcon.astro';
import SubscriptionForm from '../../components/SubscriptionForm.astro'
import SubscriptionForm from '../../components/SubscriptionForm.astro';
<CardGrid>
<Card title="44 Challenges">
This repository gathers 44 Challenges related to <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> and <b>Typescript</b>.
<Card title="45 Challenges">
This repository gathers 45 Challenges related to <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> and <b>Typescript</b>.
These challenges resolve around real-life issues or specific features to elevate your skills.
</Card>
<Card title="Subscribe to get notify of latest challenges">
<SubscriptionForm isNote={false}/>
<SubscriptionForm isNote={false} />
</Card>
<Card title="Become an OSS Maintainer">

View File

@@ -6,7 +6,6 @@ challengeNumber: 44
command: angular-view-transition
sidebar:
order: 208
badge: New
---
## Informação

View File

@@ -23,19 +23,20 @@ hero:
import { Card, CardGrid } from '@astrojs/starlight/components';
import MyIcon from '../../../components/MyIcon.astro';
import SubscriptionForm from '../../../components/SubscriptionForm.astro'
import SubscriptionForm from '../../../components/SubscriptionForm.astro';
<CardGrid>
<Card title="44 Desafios">
Este repositório possui 44 desafios relacionados a <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>,
<Card title="45 Desafios">
Este repositório possui 45 Desafios relacionados a <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>,
<b>Ngrx</b> e <b>Typescript</b>.
Esses desafios são voltados para problemas reais ou funcionalidades específicas afim de
melhorar suas habilidades.
</Card>
<Card title="Inscreva-se para ser notificado do desafio mais recente">
<SubscriptionForm isNote={false} lang="pt"/>
</Card>
{' '}
<Card title="Inscreva-se para ser notificado do desafio mais recente">
<SubscriptionForm isNote={false} lang="pt" />
</Card>
{' '}

View File

@@ -23,36 +23,38 @@ hero:
import { Card, CardGrid } from '@astrojs/starlight/components';
import MyIcon from '../../../components/MyIcon.astro';
import SubscriptionForm from '../../../components/SubscriptionForm.astro'
import SubscriptionForm from '../../../components/SubscriptionForm.astro';
<CardGrid>
<Card title="44 Испытания">
Этот репозиторий содержит 44 испытания, связанных с <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> and <b>Typescript</b>.
<Card title="45 Испытания">
Этот репозиторий содержит 45 Испытания, связанных с <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> and <b>Typescript</b>.
Испытания основаны на реальных задачах или инструментах для того, чтобы прокачать вас.
</Card>
<Card title="Subscribe to get notify of latest challenges">
<SubscriptionForm isNote={false} lang="ru"/>
<SubscriptionForm isNote={false} lang="ru" />
</Card>
<Card title="Станьте мейнтейнером открытого программного обеспечения (OSS)">
Одна из целей этого репозитория <b>снизить барьер</b> для разработки
открытого программного обеспечения (OSS). Решив эти задачи, вы поймете,
как начать вносить свой вклад в любой другой проект с открытым исходным кодом.
Одна из целей этого репозитория <b>снизить барьер</b> для разработки открытого
программного обеспечения (OSS). Решив эти задачи, вы поймете, как начать
вносить свой вклад в любой другой проект с открытым исходным кодом.
</Card>
<Card title="Учитесь вместе с другими">
Изучение и использование нового фреймворка всегда сопряжено с трудностями.
В этом наборе испытаний содержатся реальные примеры задач, чтобы закрепить на практике то, чему вы научились.
Любой может оставить комментарий или предложить помощь.
Изучение и использование нового фреймворка всегда сопряжено с трудностями. В
этом наборе испытаний содержатся реальные примеры задач, чтобы закрепить на
практике то, чему вы научились. Любой может оставить комментарий или
предложить помощь.
<b>
Учиться одному - здорово, но обучение вместе с другими поможет вам добиться большего.
Учиться одному - здорово, но обучение вместе с другими поможет вам добиться
большего.
</b>
</Card>
<Card title="Вносите свой вклад">
У вас есть идея или интересный баг? Не стесняйтесь;{' '}
<b>Создавайте свои собственные испытания</b> не теряя времени.
<b>Создавайте свои собственные испытания</b> не теряя времени.
</Card>
<Card title="Подготовьтесь к собеседованию">
@@ -61,8 +63,9 @@ import SubscriptionForm from '../../../components/SubscriptionForm.astro'
</Card>
<Card title="Поддержка">
Это бесплатный проект, и он будет оставаться таковым как можно дольше.
Однако вся работа ведется в мое свободное время, включая создание новых испытаний и ревью их решений(PRs).
Это бесплатный проект, и он будет оставаться таковым как можно дольше. Однако
вся работа ведется в мое свободное время, включая создание новых испытаний и
ревью их решений(PRs).
<b>Спонсорство может поддержать меня и способствовать развитию проекта</b>.
</Card>