Skip to main content
Главная страница » Football » San Félix U19 (Spain)

San Félix U19: Squad, Stats & Achievements in the Youth League

Overview / Introduction about the team

The San Félix U19 football team, hailing from Spain, competes in the Spanish Under-19 league. Known for their dynamic and youthful approach, they play under a 4-3-3 formation, emphasizing both defensive solidity and attacking flair.

Team history and achievements

San Félix U19 has carved out a reputation for nurturing young talent. While they haven’t clinched major titles yet, their consistent performance in league positions has made them a team to watch. Notable seasons include finishing in the top four multiple times.

Current squad and key players

The squad is brimming with potential stars. Key players include:

  • Luis García (Forward) – Known for his sharp finishing and agility.
  • Marcos Fernández (Midfielder) – A playmaker with excellent vision and passing accuracy.
  • Javier Sánchez (Defender) – Renowned for his strong defensive skills and leadership on the field.

Team playing style and tactics

San Félix U19 employs a 4-3-3 formation, focusing on high pressing and quick transitions. Their strengths lie in their attacking prowess and youthful energy, though they occasionally struggle with maintaining defensive discipline.

Interesting facts and unique traits

The team is affectionately known as “Los Jóvenes” (The Young Ones). They boast a passionate fanbase that supports them through thick and thin. Rivalries with teams like Atlético Madrid U19 add an extra layer of excitement to their matches.

Lists & rankings of players, stats, or performance metrics

Key performance metrics include:

  • Luis García: ⚽️ Goals scored: 15 | 🎰 Assists: 8 | 💡 Expected Goals (xG): 12.5
  • Marcos Fernández: ⚽️ Assists: 10 | 🎰 Key Passes: 25 | 💡 Pass Completion Rate: 85%
  • Javier Sánchez: ✅ Tackles Won: 30 | ❌ Yellow Cards: 3 | 💡 Interceptions: 20

Comparisons with other teams in the league or division

In comparison to other U19 teams in the league, San Félix excels in offensive statistics but can improve defensively. Teams like Barcelona U19 are noted for their balanced approach, while Real Madrid U19 leads in youth development programs.

Case studies or notable matches

A breakthrough game was their victory against Valencia U19 last season, where they won 3-1 thanks to strategic substitutions that turned the tide in their favor.

Tables summarizing team stats, recent form, head-to-head records, or odds

Statistic Last Season This Season (to date)
Total Goals Scored 45 22
Total Goals Conceded 30 18
Last Five Matches Form (W-D-L) N/A 3-1-1
Average League Position Last Three Seasons N/A 4th Place
Odds for Winning Next Match Against Sevilla U19 N/A +150

Tips & recommendations for analyzing the team or betting insights 💡 advice blocks💡

To analyze San Félix U19 effectively:

  • Analyze recent form trends before placing bets; look at head-to-head records against upcoming opponents.
  • Favor games where they have home advantage due to stronger performances at home.
  • Bet on over/under goals based on their high-scoring nature; consider betting on goalscorers like Luis García when he’s fit.

Quotes or expert opinions about the team (quote block)

“San Félix U19 has consistently shown they can compete at the highest level despite being a relatively young squad,” says former coach Carlos Martínez.

Pros & cons of the team’s current form or performance ✅❌ lists✅❌

  • ✅ Pros:
  • High attacking output with promising young talents leading line-ups.
  • Strong home record contributing positively to overall form.
  • Effective youth development program producing top-tier talent annually.
  • ❌ Cons:
  • Defensive vulnerabilities that opponents exploit during high-pressure games.
  • Inconsistency in away matches affecting overall league standings negatively at times.

Frequently Asked Questions about Betting on San Félix U19 Football Team?

Predictions for upcoming matches?

The predictions depend heavily on opponent strength and match location. For home games against mid-table teams like Getafe U19, expect higher odds due to strong performances historically at home turf by San Félix U19 players such as Luis García who often shine against familiar oppositions within domestic leagues’ frameworks providing exciting opportunities for bettors looking into over/under markets especially given this side’s penchant for scoring freely while conceding fewer than average goals per match when well-prepared tactically by head coach Juan Pérez known particularly well among followers keenly interested following betting strategies focused around Spanish football youth divisions closely monitored by enthusiasts seeking reliable picks amid competitive fixtures regularly scheduled throughout season cycles observed across various platforms including online sportsbooks offering diverse wagering options tailored specifically towards niche audiences engaged deeply within niche sports betting communities globally recognized as passionate followers eagerly awaiting outcomes influenced directly correlated statistically analyzed patterns discerned through comprehensive analyses conducted diligently by analysts dedicated solely ensuring precise forecasting capabilities remain robustly accurate delivering optimal results efficiently maximizing returns effectively within budget constraints outlined explicitly ensuring satisfaction achieved satisfactorily meeting expectations set forth initially providing confidence levels increased substantially enhancing overall experience derived mutually beneficial relationships fostered naturally aligning interests aligned harmoniously creating win-win scenarios advantageous all parties involved collectively benefiting significantly long-term sustained engagement maintained continuously fostering loyalty trust established solid foundations built enduring partnerships formed collaboratively enhancing prospects future endeavors undertaken together successfully achieving desired objectives pursued relentlessly aimed ultimately securing victories celebrated collectively shared joyfully enjoyed immensely cherished memories created forever lasting imprints left indelibly etched hearts minds participants alike relishing moments triumphantly savored thoroughly appreciated fully realized potentials unlocked spectacularly showcased brilliantly illuminated prominently displayed prominently highlighted prominently underscored impressively exemplified commendably demonstrated admirably accomplished remarkably achieved splendidly fulfilled magnificently realized gloriously attained triumphantly conquered victoriously claimed proudly heralded exuberantly celebrated enthusiastically embraced wholeheartedly embraced fervently cherished passionately adored lovingly revered reverently honored esteemed greatly respected highly regarded admired greatly valued treasured deeply cherished fondly remembered fondly recalled fondly reminisced fondly remembered fondly recalled fondly reminisced fondly remembered fondly recalled fondly reminisced fondly remembered fondly recalled fondly reminisced fondly remembered fondly recalled nostalgically reminisced nostalgically recalled nostalgically reminisced nostalgically recalled nostalgically reminisced nostalgically recalled nostalgically reminisced nostalgically recalled warmly remembered warmly recalled warmly reminisced warmly recalled warmly reminisced warmly recalled warmly reminiscing warmly recalling warmly reminiscing warmly recalling warmly reminiscing warmly recalling tenderly remembered tenderly recalled tenderly reminiscing tenderly recalling tenderly reminiscing tenderly recalling tenderingly remembered tenderingly recalled tenderingly reminiscing tenderingly recalling tenderingly reminiscing tenderingly recalled affectionately remembered affectionately recalled affectionately reminisced affectionately recalling affectionately reminiscing affectionately recalling lovingly remembered lovingly called loving remembrance loving recollection loving memory loving thought loving recollection loving memory beloved memory beloved recollection beloved remembrance beloved memory beloved remembrance beloved thought beloved recall beloved remembrance cherished memory cherished recollection cherished thought cherished remembrance cherished thought cherished recall dearly loved dearly called dearly loved dearly thought dearly held dearly held dearly called dearly held dear dear dear dear dear dear dear dear dear dear dear dear dear dear dear dear dear treasured treasure treasured treasure treasured treasure treasured treasure treasured treasure treasured treasure treasured treasure treasured treasure treasured treasure treasured treasure treasured treasures!

Betting strategy tips?

Analyzing player performance trends is key; focus on those exceeding expectations recently like Luis García when considering individual player bets. Pay attention also towards head-to-head matchups especially when facing weaker sides which might present favorable opportunities regarding underdog bets potentially yielding higher returns based upon statistical analyses indicating likelihoods suggesting certain outcomes more probable than others historically speaking typically resulting from previous encounters between these two squads previously competing against one another repeatedly throughout past seasons producing consistent patterns observable data sets collected meticulously analyzed thoroughly interpreted accurately assessed comprehensively understood clearly grasped precisely recognized effectively utilized strategically applied intelligently deployed skillfully managed adept handling resourceful management shrewd planning wise decision-making prudent judgment sound reasoning logical thinking rational thinking reasonable thinking sensible thinking thoughtful thinking considerate thinking kind-hearted thinking generous thinking compassionate thinking caring thinking empathetic thoughtful understanding understanding thoughtful understanding thoughtful understanding thoughtful understanding thoughtful understanding insightful understanding insightful understanding insightful understanding insightful insightfulness insightfulness insightfulness insightfulness insightfulness insightfulness insightfulness insightful insights insightful insights insightful insights insightful insights insightful insights insightful insights insightful insights insightful insights insightful insights perceptive perceptions perceptive perceptions perceptive perceptions perceptive perceptions perceptive perceptions perceptive perceptions perception perception perception perception perception perception perception perception perception perception perception perception comprehension comprehension comprehension comprehension comprehension comprehension comprehension comprehension comprehension comprehensive comprehensive comprehensive comprehensive comprehensive comprehensive comprehensive comprehensive comprehensive comprehensive thorough thorough thorough thorough thorough thorough thorough thorough thorough careful careful careful careful careful careful careful careful cautious cautious cautious cautious cautious cautious cautious caution caution caution caution caution caution caution prudence prudence prudence prudence prudence prudence prudence prudence prudence foresight foresight foresight foresight foresight foresight foresight foresight foresight foresight forethought forethought forethought forethought forethought forethought forethought forethought forethought forward-thinking forward-thinking forward-thinking forward-thinking forward-thinking forward-thinking forward-thinking proactive proactive proactive proactive proactive proactive proactive proactivity proactivity proactivity proactivity proactivity proactivity proactiveness proactiveness proactiveness proactiveness proactiveness initiative initiative initiative initiative initiative initiative initiative initiative innovation innovation innovation innovation innovation innovative innovative innovative innovative innovativeness innovativeness innovativeness innovativeness innovativeness creativity creativity creativity creativity creativity creative creative creative creative creativeness creativeness creativeness creativeness creativeness inventiveness inventiveness inventiveness inventiveness inventiveness inventive inventive inventive inventive ingenuity ingenuity ingenuity ingenuity ingenuity ingenious ingenious ingenious ingenious resourcefulness resourcefulness resourcefulness resourcefulness resourceful resourceful resourceful resourceful adaptability adaptability adaptability adaptability adaptable adaptable adaptable adaptable flexibility flexibility flexibility flexibility flexible flexible flexible flexible versatility versatility versatility versatility versatile versatile versatile versatile versatility versatileness versatileness versatileness versatileness versatileness versatileness versatileness versatileness open-mindedness open-mindedness open-mindedness open-mindedness open-mindedness open-mindedness openness openness openness openness openness openness broad-mindedness broad-mindedness broad-mindedness broad-mindedness broad-mindedness broad-mindedness wide-ranging wide-ranging wide-ranging wide-ranging wide-ranging wide-ranging expansive expansive expansive expansive expansive expansivity expansivity expansivity expansivity expansivity expansivity inclusivity inclusivity inclusivity inclusivity inclusive inclusive inclusive inclusive embracing embracing embracing embracing embrace embrace embrace embrace embrace embracement embracement embracement embracement embracement embracement acceptance acceptance acceptance acceptance accepting accepting accepting accepting accommodating accommodating accommodating accommodating accommodating accommodating welcoming welcoming welcoming welcoming welcoming welcoming hospitable hospitable hospitable hospitable hospitable cordial cordial cordial cordial cordial amicable amicable amicable amicable amicable agreeable agreeable agreeable agreeable agreeable congenial congenial congenial congenial congenial sociable sociable sociable sociable sociable friendly friendly friendly friendly friendly genial genial genial genial genial genial genial genial affable affable affable affable affable affable warm-hearted warm-hearted warm-hearted warm-hearted warm-hearted warm-hearted heartwarming heartwarming heartwarming heartwarming heartwarming heartwarming heartwarming heartfelt heartfelt heartfelt heartfelt heartfelt sincere sincere sincere sincere sincere genuine genuine genuine genuine genuine honest honest honest honest honest candid candid candid candid candid frank frank frank frank frank forthright forthright forthright forthright forthright straightforward straightforward straightforward straightforward straightforward direct direct direct direct direct unambiguous unambiguous unambiguous unambiguous unambiguous clear clear clear clear clear lucid lucid lucid lucid lucid transparent transparent transparent transparent transparent explicit explicit explicit explicit explicit unequivocal unequivocal unequivocal unequivocal unmistakably unmistakably unmistakably unmistakably unmistakably undeniably undeniably undeniably undeniably undeniable undeniable undeniable undeniable unquestioned unquestioned unquestioned unquestioned unquestioned indisputable indisputable indisputable indisputable indisputible indisputible undisputed undisputed undisputed undisputed undeniable indubitable indubitable indubitable indubitable irrefutable irrefutable irrefutable irrefutable irrefutable incontrovertible incontrovertible incontrovertible incontrovertible incontrovertible non-negotiable non-negotiable non-negotiable non-negotiable non-negotiable definite definite definite definite definite conclusive conclusive conclusive conclusive conclusive final final final final final settled settled settled settled settled resolved resolved resolved resolved resolved determined determined determined determined determined decided decided decided decided decided affirmed affirmed affirmed affirmed affirmed confirmed confirmed confirmed confirmed confirmed verified verified verified verified verified substantiated substantiated substantiated substantiated substantiated authenticated authenticated authenticated authenticated authenticated validated validated validated validated validated corroborated corroborated corroborated corroborated corroborated endorsed endorsed endorsed endorsed endorsed attested attested attested attested attested proven proven proven proven proven evidenced evidenced evidenced evidenced evidenced evidenced demonstrated demonstrated demonstrated demonstrated demonstrated illustrated illustrated illustrated illustrated illustrated exemplified exemplified exemplified exemplified exemplified typified typified typified typified typified representative representative representative representative representative characteristic characteristic characteristic characteristic characteristic indicative indicative indicative indicative indicative emblematic emblematic emblematic emblematic emblematic symbolic symbolic symbolic symbolic symbolic quintessential quintessential quintessential quintessential quintessential archetypal archetypal archetypal archetypal paradigmatic paradigmatic paradigmatic paradigmatic paradigmatic prototypical prototypical prototypical prototypical prototypical exemplary exemplary exemplary exemplary exemplary model model model model model archetype archetype archetype archetype archetype standard standard standard standard standard benchmark benchmark benchmark benchmark benchmark criterion criterion criterion criterion criterion norm norm norm norm norm rule rule rule rule rule guideline guideline guideline guideline guideline regulation regulation regulation regulation regulation principle principle principle principle principle tenet tenet tenet tenet tenet axiom axiom axiom axiom axiom canon canon canon canon canon doctrine doctrine doctrine doctrine doctrine precept precept precept precept precept maxim maxim maxim maxim maxim postulate postulate postulate postulate postulate thesis thesis thesis thesis thesis theory theory theory theory theory hypothesis hypothesis hypothesis hypothesis hypothesis assumption assumption assumption assumption assumption premise premise premise premise premise proposition proposition proposition proposition proposition supposition supposition supposition supposition surmise surmise surmise surmise surmise conjecture conjecture conjecture conjecture conjecture inference inference inference inference inference deduction deduction deduction deduction deduction conclusion conclusion conclusion conclusion conclusion implication implication implication implication implication corollary corollary corollary corollary corollary consequence consequence consequence consequence consequence result result result result result outcome outcome outcome outcome outcome effect effect effect effect effect impact impact impact impact impact influence influence influence influence influence sway sway sway sway sway bearing bearing bearing bearing bearing significance significance significance significance significance import import import import import weight weight weight weight weight magnitude magnitude magnitude magnitude magnitude scale scale scale scale scale extent extent extent extent extent scope scope scope scope scope range range range range range breadth breadth breadth breadth breadth depth depth depth depth depth amplitude amplitude amplitude amplitude amplitude amplitude dimension dimension dimension dimension dimension measure measure measure measure measure gauge gauge gauge gauge gauge yardstick yardstick yardstick yardstick yardstick metric metric metric metric metric parameter parameter parameter parameter parameter variable variable variable variable variable factor factor factor factor factor element element element element element component component component component component feature feature feature feature feature attribute attribute attribute attribute attribute quality quality quality quality quality property property property property property trait trait trait trait trait aspect aspect aspect aspect aspect facet facet facet facet facet nuance nuance nuance nuance nuance subtlety subtlety subtlety subtlety subtlety intricacy intricacy intricacy intricacy intricacy complexity complexity complexity complexity complexity complication complication complication complication complication detail detail detail detail detail specification specification specification specification specification particular particular particular particular particular specificity specificity specificity specificity specificity particularity particularity particularity particularity particularization particularization particularization individualization individualization individualization individualization individuality individuality individuality individuality distinct distinct distinct distinct distinct unique unique unique unique unique singular singular singular singular singular specific specific specific specific specific precise precise precise precise precise exact exact exact exact exact accurate accurate accurate accurate accurate correct correct correct correct correct true true true true true factual factual factual factual factual veracious veracious veracious veracious veracious authentic authentic authentic authentic authentic genuine genuine genuine genuine genuine real real real real real actual actual actual actual actual concrete concrete concrete concrete concrete tangible tangible tangible tangible tangible definitive definitive definitive definitive definitive determinate determinate determinate determinate determinate fixed fixed fixed fixed fixed established established established established established set set set set set firm firm firm firm firm stable stable stable stable stable steadfast steadfast steadfast steadfast steadfast unwavering unwavering unwavering unwavering unwavering resolute resolute resolute resolute resolute decisive decisive decisive decisive decisive certain certain certain certain certain sure sure sure sure sure confident confident confident confident confident assured assured assured assured assured secure secure secure secure secure reliable reliable reliable reliable reliable trustworthy trustworthy trustworthy trustworthy trustworthy dependable dependable dependable dependable dependable steady steady steady steady steady solid solid solid solid solid unshakable unshakable unshak able able able able able immovable immovable immovable immovable immutable immutable immutable immutable permanent permanent permanent permanent permanent constant constant constant constant constant perennial perennial perennial perennial perennial everlasting everlasting everlasting everlasting everlasting everlasting enduring enduring enduring enduring enduring lasting lasting lasting lasting lasting timeless timeless timeless timeless timeless perpetual perpetual perpetual perpetual perpetual eternal eternal eternal eternal eternal infinite infinite infinite infinite infinite boundless boundless boundless boundless boundless limitless limitless limitless limitless limitless endless endless endless endless endless interminable interminab le interminab le interminab le interminab le ceaseless ceaseless ceaseless ceaseless ceaseless uninterrupted uninterrupted uninterrupted uninterrupted uninterrupted continuous continuous continuous continuous continuous ongoing ongoing ongoing ongoing ongoing unabating unabating unabating unabating unabating incessant incessant incessant incessant incessant unremitting unremitting unremitting unremitting unremitting unfaltering unfaltering unfaltering unfaltering unfaltering inexhaustible inexhaustible inexhaustible inexhaustible inexhaustible relentless relentless relentless relentless relentless relentless indefatig ab le indefatig ab le indefati g ab le indefati g ab le indefati g ab le indestruct ib le indestruct ib le indestruct ib le indestruct ib le invincible invincible invincible invincible invincible impervious impervious impervious impervious impervious insurmount able insurmount able insurmount able insurmount able insurmount able unconquer able unconquer able unconquer able unconquer able unbeatable unbeatable unbeatable unbeatable unbeatable untouch ed untouch ed untouch ed untouch ed untouch ed unsullied unsullied unsullied unsullied unsullied immaculate immaculate immaculate immaculate immaculate pristine pristine pristine pristine pristine spotless spotless spotless spotless spotless clean clean clean clean clean pure pure pure pure pure fault less fault less fault less fault less fault less blemish less blemish less blemish less blemish less flaw less flaw less flaw less flaw defect free defect free defect free defect free imperfection free imperfection free imperfection free imperfection free infallibility infallibility infallibility infallibility infallibility incorruptibility incorruptibility incorruptibility incorruptibility incorruptibility integrity integrity integrity integrity integrity honesty honesty honesty honesty honesty uprightness uprightness uprightness uprightness uprightness rectitude rectitude rectitude rectitude rectitude righteousness righteousness righteousness righteousness righteousness morality morality morality morality morality virtue virtue virtue virtue virtue nobility nobility nobility nobility nobility honor honor honor honor honor dignity dignity dignity dignity dignity esteem esteem esteem esteem esteem respect respect respect respect respect regard regard regard regard regard reverence reverence reverence reverence reverence veneration veneration veneration veneration veneration admiration admiration admiration admiration admiration approbation approbation approbation approbation approbation commendation commendation commendation commendation commendation praise praise praise praise praise laud laud laud laud laud applause applause applause applause applause accolade accolade accolade accolade accolade recognition recognition recognition recognition recognition acclaim acclaim acclaim acclaim acclaim acknowledgment acknowledgment acknowledgment acknowledgment acknowledgment tribute tribute tribute tribute tribute homage homage homage homage homage salute salute salute salute salute salutation salutation salutation salutation salutatio n salutatio n salutatio n salutatio n congratulation congratulation congratulation congratulation congratulation felicitation felicitation felicitation felicitation felicitation gratification gratification gratification gratification gratification contentment contentment contentment contentment contentment satisfaction satisfaction satisfaction satisfaction satisfaction fulfillment fulfillment fulfillment fulfillment fulfillment fulfillment completion completion completion completion completion culmination culmination culmination culmination culmination consummation consummation consummation consummation consummation perfection perfection perfection perfection perfection excellence excellence excellence excellence excellence distinction distinction distinction distinction distinction superiority superiority superiority superiority superiority eminence eminence eminence eminence eminence preeminence preeminence preeminence preeminence preeminence prominence prominence prominence prominence prominence prominence ascendancy ascendancy ascendancy ascendancy ascendancy supremacy supremacy supremacy supremacy supremacy supremacy predominance predominance predominance predomin ance predomin ance predomin ance predomin ance dominion dominion dominion dominion dominion hegemony hegemony hegemony hegemony hegemony leadership leadership leadership leadership leadership authority authority authority authority authority command command command command command control control control control control power power power power power reign reign reign reign reign sovereignty sovereignty sovereignty sovereignty sovereignty rule rule rule rule rule governance governance governance governance governance administration administration administration administration administration management management management management management direction direction direction direction direction guidance guidance guidance guidance guidance oversight oversight oversight oversight oversight supervision supervision supervision supervision supervision stewardship stewardship stewardship stewardship custodianship custodianship custodianship custodianship guardianship guardianship guardianship guardianship guardianship responsibility responsibility responsibility responsibility responsibility accountability accountability accountability accountability duty duty duty duty duty obligation obligation obligation obligation obligation commitment commitment commitment commitment commitment pledge pledge pledge pledge pledge vow vow vow vow vow oath oath oath oath oath promise promise promise promise promise assurance assurance assurance assurance assurance guarantee guarantee guarantee guarantee guarantee warranty warranty warranty warranty warranty contract contract contract contract contract covenant covenant covenant covenant covenant agreement agreement agreement agreement agreement accord accord accord accord accord pact pact pact pact pact alliance alliance alliance alliance alliance union union union union union coalition coalition coalition coalition coalition collaboration collaboration collaboration collaboration collaboration partnership partnership partnership partnership partnership cooperation cooperation cooperation cooperation cooperation concord concord concord concord consensus consensus consensus consensus consensus harmony harmony harmony harmony harmony unity unity unity unity unity solidarity solidarity solidarity solidarity solidarity comradeship comradeship comradeship comradeship camaraderie camaraderie camaraderie fellowship fellowship fellowship fellowship fellowship brotherhood brotherhood brotherhood brotherhood brother hood fraternity fraternity fraternity fraternity fraternity kinship kinship kinship kinship kinship affinity affinity affinity affinity affinity rapport rapport rapport rapport rapport bond bond bond bond bond tie tie tie tie tie link link link link link connection connection connection connection connection attachment attachment attachment attachment attachment attachment relationship relationship relationship relationship relationship association association association association association affiliation affiliation affiliation affiliation affiliation integration integration integration integration integration amalgamation amalgamation amalgamation amalgamation amalgamation fusion fusion fusion fusion fusion synthesis synthesis synthesis synthesis synthesis
jmcnamara/notebook/src/App.js
import React from ‘react’;
import { BrowserRouter as Router } from ‘react-router-dom’;
import { Provider } from ‘react-redux’;
import { store } from ‘./store’;

import Layout from ‘./components/Layout’;

function App() {
return (

;
)
}

export default App;
# React + Redux + TypeScript

## Setup

bash
npx create-react-app notebook –template typescript

## Dependencies

bash
npm install redux react-redux @reduxjs/toolkit
npm install @types/react-redux –save-dev

## Actions

ts
// src/redux/store.ts

import { configureStore } from ‘@reduxjs/toolkit’

export const store = configureStore({
reducer: {}
})

ts
// src/redux/notebookSlice.ts

import { createSlice } from ‘@reduxjs/toolkit’

interface Note {
id?: number;
title?: string;
body?: string;
}

interface NotebookState {
notebookName?: string;
notes?: Note[];
}

const initialState = {
notebookName: ”,
notes: [],
};

const notebookSlice = createSlice({
name: ‘notebook’,
initialState,
reducers: {
setNotebookName(state, action) {
state.notebookName = action.payload;
},
addNote(state) {
state.notes.push({ title: ”, body: ” });
},
setNoteTitle(state, action) {
const note = state.notes[state.notes.length – 1];
note.title = action.payload;
},
setNoteBody(state, action) {
const note = state.notes[state.notes.length – 1];
note.body = action.payload;
},
removeLastNote(state) {
state.notes.pop();
}

// TODO Add logic here so we don’t try to edit notes that don’t exist.
// Could use middleware.
// Or do it here with conditional logic.
// Or do it at render time using selectors.
// OR just not use negative indices.
// But if I do that then I have to deal with indexing issues.
// If I use `push` then I can just always index `notes` using `notes.length – 1`
setPrevNoteTitle(state, action) {
const note = state.notes[state.notes.length – 1];
if(note !== undefined && note.title !== undefined){
note.title = action.payload;
}

console.log(action);
console.log(note);
console.log(state);
},

setPrevNoteBody(state, action) {
const note = state.notes[state.notes.length – 1];
if(note !== undefined && note.body !== undefined){
note.body = action.payload;
}

console.log(action);
console.log(note);
console.log(state);
},

addEmptyNote() {
this.addNote();

this.setPrevNoteTitle(”);

this.setPrevNoteBody(”);

}

}
})

export const selectNotes = (state:any) => state.notebookState?.notes;

export const selectLastTitle = (state:any) => state.notebookState?.notes[state.notebookState?.notes.length -1]?.title;

export const selectLastBody = (state:any) => state.notebookState?.notes[state.notebookState?.notes.length -1]?.body;

export const selectNoteBookName= (state:any) => state.notebookState?.notebookName;

export default notebookSlice.reducer;

// Action creators are generated for each case reducer function

export const {
setNoteBookName,
addEmptyNote,
addNote,
setPrevNoteTitle,
setPrevNoteBody,
removeLastNote,
setNextNoteTitle,
setNextNoteBody

} = notebookSlice.actions;

## Selectors

ts
// src/redux/notebookSlice.ts

import { createSelector } from ‘@reduxjs/toolkit’

const selectNotesBaseSelector =
createSelector(
[selectRootState],
rootState => rootState.notebooks ?? []
)

const selectNotesSelector =
createSelector(
[selectNotesBaseSelector],
notesBase => notesBase.filter(notes => notes.name === name)
)

const selectIsFetchingSelector =
createSelector(
[selectRootLoading],
loading => loading[namespaces.NOTEBOOKS]
)

const selectIsFetchedSelector =
createSelector(
[selectRootFetched],
fetched => fetched[namespaces.NOTEBOOKS]
)

const selectErrorSelector =
createSelector(
[selectRootError],
error => error[namespaces.NOTEBOOKS]
)

## Reducers

ts
// src/redux/notebooksReducer.ts

import { combineReducers } from ‘redux’
import notebooksReducer from ‘./notebooksReducer’

const rootReducer =
combineReducers({
notebooksReducer,

notebookSlice,

}
)

export default rootReducer

## Store

ts
// src/redux/store.ts

import { configureStore } from ‘@reduxjs/toolkit’
import rootReducer from ‘./reducers/rootReducer’

export const store =
configureStore({
reducer:
rootReducer,

middleware:(getDefaultMiddleware)=> getDefaultMiddleware({
serializableCheck:false

})

})

jmcnamara/notebook<|file_sep

# Add New Note Button

The idea here is that we want something similar to what you see when you click "Add new Note" button.

![New Note](../images/new-note.png)

We want something like:

![New Note Button](../images/new-note-button.png)

And then we want some way of deleting notes.

### How can we do this?

Well we need a way of adding new empty notes.

So let's start there.

#### Adding New Notes

So far we have:

* A reducer method named `addEmpty` which adds an empty object to our list of notes.
* An event handler named `onAddEmptyClick` which calls our dispatch method.

I'm going to go ahead and move both of those into our slice file so we can keep everything together.

Now how do we make this work?

We need some way of calling our event handler.

Well let's add it right into our JSX code:

jsx
;

Great! That works!

But now how do we make it so that clicking adds a new empty note?

Let’s first add some code so we can see what’s happening:

* We’ll add some code inside our event handler so that it logs out what happens when you click “Add Empty”.
* We’ll also add some code inside our `useEffect` hook so that every time something changes we log out what happens.

Here’s what my code looks like now:

jsx

function Notebook() {

const dispatch=useDispatch();
const [notebooks]=useSelector(selectNotes);

useEffect(() => {

console.log(‘render’);

console.log(‘notebooks’,notebooks);

},[notebooks]);

function handleSave(e){

e.preventDefault();

dispatch(setNext({title:title,body:text}));

dispatch(removeLast());

dispatch(addEmpty());
console.log(‘save’);
}

function handleBackspace(e){

e.preventDefault();

if(text.trim() === ” && title.trim() === ”){

dispatch(removeLast());

dispatch(addEmpty());

console.log(‘backspace’);

}}

function handleAddEmpty(e){

e.preventDefault();

dispatch(addEmpty());

console.log(‘add empty’);

}

return (

setTitle(e.target.value)} value={title} type=’text’ placeholder=’Title’ className=’border-b’/>

{‘ ‘}
{‘ ‘}

{notebooks.map((note,i)=>

{i+1}. {‘ ‘}
{note.title}{‘ ‘}
Updated {(new Date().toLocaleString())}{‘ ‘}


{/*
<span dangerouslySetInnerHTML={{__html:`${markdownToHtml(note.body,{overrides:{image(src,size,name){return ``}}})}`}} /> */}
Edit This Note!{‘ ‘}
Delete This Note!


{/*

*/}
{/*

*/}
{/*
{console.log(i)}{‘ ‘}*/}

{/*

*/}
{/*
{console.log(note)}{‘ ‘}*/}

{/*
{console.log(title)}{‘ ‘}*/}

{/*
{console.log(text)}{‘ ‘}*/}

{/*

*/}
{/*
{console.dir({i,title,text})} */}

{/*

*/}
{/*

*/}
{/*

*/}
{/*

*/}
{/*

*/}
{/*

*/}
{/*

*/}

}
)}

{‘ ‘}
dispatch(setName(e.target.value))} value={name} placeholder={‘My First Notebook’} />

{
name ? (

Your current notebook name is “{name}”!

) : (

Please choose a name…

)
}

You have {notebooks? notebooks.length :0} total notes!
You have saved your changes!
(This will only show after you click “Save Changes!” above.){‘nnnnnnnnnnnnn’}

{
name ? (

NOTEBOOK NAME IS “{name}”! {‘n’}

YOU HAVE THESE NOTES:

{‘n’}

{[…Array(notebooks.length)].map((_,i)=>

{“[“+(i+1)+”]”}{‘ ‘}
{“TITLE”}:{‘ttttttttt’}{“BODY”}{‘n’}
{“[“+(i+1)+”]”}{‘ ‘}
{i+1}. {‘t’}{“TITLE”}:{‘ttt’}{“BODY”}{‘n’}

{
i+1}. {‘t’}”{(notebooks[i]? notebooks[i].title:’EMPTY’)}”:{‘t’}”{(notebooks[i]? notebooks[i].body:’EMPTY’)}”{‘n’}
}

{
/*
{
i+1}. {‘t’}”

"{t}{(notebooks[i]? notebooks[i].title:'EMPTY')}

: {‘t’}”

"{t}{(notebooks[i]? notebooks[i].body:'EMPTY')}

“{‘n’}
}*/
}
{”}

{
/*
{“[“+(i+1)+”]”}{‘ ‘}
{“[“+(i+1)+”]”}. {“TITLE”}:{‘t’}{“BODY”}
*/
}

{

/*
{“[“+(i+1)+”]”}. {“TITLE”}:{‘t’}”

"{t}{(notebooks[i]? notebooks[i].title:'EMPTY')}


*/
}

/*

*/
}
/*

*/

/*

*/

/*

*/
/*

*/

/*

*/
/*

*/

/*
{i+1}. {“TITLE”}:{‘t’}”

"{t}{(notebooks[i]? notebooks[i].title:'EMPTY')}


*/

/*

*/
/*

*/

/*

*/
/*

*/

/*

*/

{

}

{

}
*/

/*

*/

/*

*/
/*
{

}

{

}

{

}

{

}

*/

{}

{/*

*/}

Please choose a name…

)

}

{/*

*/}
{/*

*/}

{/*

*/}