Dev communicates
2 subscribers
7 photos
3 files
20 links
Download Telegram
Redux toolkit examples #redux

git clone git@github.com:reduxjs/redux-toolkit.git
$ yt-dlp  -f "bestaudio/best[ext=m4a]" 4kmFt3apCRkuB13n4YjT0M2TJhXp
Dispatching a slice #react #redux
dispatch(apiSlice.endpoints.saveData.initiate(modifiedData));
The entity #adapter in #Redux #Toolkit is a powerful API that simplifies the management of normalized state.
It provides a set of prebuilt reducers and selectors for performing CRUD (Create, Read, Update, Delete) operations on a normalized state structure containing instances of a particular type of data object.

import { createEntityAdapter, createSlice } from '@reduxjs/toolkit';

// Define a "User" entity
type User = {
id: string;
name: string;
};

// Create an entity adapter for "User"
const usersAdapter = createEntityAdapter<User>();

// Create a slice that uses the entity adapter
const usersSlice = createSlice({
name: 'users',
initialState: usersAdapter.getInitialState(),
reducers: {
// Reducer logic using adapter methods
userAdded: usersAdapter.addOne,
userUpdated: usersAdapter.updateOne,
userRemoved: usersAdapter.removeOne,
},
});

// Export the generated actions and selectors
export const { userAdded, userUpdated, userRemoved } = usersSlice.actions;
export const {
selectById: selectUserById,
selectIds: selectUserIds,
selectEntities: selectUserEntities,
selectAll: selectAllUsers,
} = usersAdapter.getSelectors(state => state.users);
Search Everywhere (Double Shift):

This powerful feature allows you to search for various things within your project, including symbols. Type the variable name and filter by "Symbol" to see all occurrences across files.
#intelij #shortkey
There are several ways to #format your code in #IntelliJ IDEA:

1. Reformatting a Selection (Shortcut: Ctrl+Alt+L (Windows/Linux), ⌘⌥L (macOS))

Highlight the specific section of code you want to reformat.
Press Ctrl + Alt + L (Windows/Linux) or ⌘ + ⌥ + L (macOS).
This will reformat the selected code according to your configured code style settings.

2. Reformatting the Entire File (Shortcut: Ctrl+Alt+Shift+L (Windows/Linux), ⌘⌥⇧L (macOS))

Open the file you want to reformat.
Press Ctrl + Alt + Shift + L (Windows/Linux) or ⌘ + ⌥ + ⇧ + L (macOS).
This will display a dialog where you can choose formatting options (e.g., reformat only changed lines) before applying the formatting to the entire file.
For navigating to source of something:

1. Click on the Function or ...
2. Press Ctrl + Alt + B

#IntelliJ
This gives you ability to reset entire api state with a single dispatch #rtk #react

dispatch(baseApi.util.resetApiState());
Build Your Community - Turn your connections into a powerful online community
by Richard Millington

Buzzing Communities - How to Build Bigger, Better, and More Active Online Communities
by Richard Millington

The Art of Community - Building The New Age Of Participation
by Jono Bacon

Getting Together - How to Build a Community With Your People
by Bailey Richardson, Kevin Huynh, and Kai Elmer Sotto

Find Your People - Building Deep Community in a Lonely World
by Brendan Burchard

The Business of Belonging - How to Make Community your Competitive Advantage
by Jacqueline Hermes

Building Brand Communities - How Organizations Succeed by Creating Belonging
by Carrie Melissa Jones and Charles Vogl

Superfans - The Easy Way to Stand Out, Grow Your Tribe, and Build a Successful Business
by Pat Flynn

Get Together - How to Build a Community with Your People
by Bailey Richardson, Kevin Huynh, and Kai Elmer Sotto

Community Building on the Web - Secret Strategies for Successful Online Communities
by Amy Jo Kim

People Powered - How Communities Can Supercharge Your Business, Brand, and Teams
by Jono Bacon

Tribes - We Need You to Lead Us
by Seth Godin

#bookmark #book #professional_networking
#mui #media_query #responsive

Using `@mui/system`'s `styled` Component:

import { styled } from '@mui/system';

const MyComponent = styled('div')(({ theme }) => ({
width: '100%',
[theme.breakpoints.up('md')]: {
width: '50%',
},
}));


Employing `theme.breakpoints`:

import { useTheme } from '@mui/material/styles';

function MyComponent() {
const theme = useTheme();

const styles = {
container: {
width: '100%',
[theme.breakpoints.up('md')]: {
width: '50%',
},
},
};

return <div style={styles.container}>...</div>;
}


Leveraging `useMediaQuery` Hook:

import { useMediaQuery } from '@mui/material';

function MyComponent() {
const matches = useMediaQuery('(min-width:600px)');

return <div>{matches ? 'Large screen' : 'Small screen'}</div>;
}
Forwarded from Yasin Gorgij
Let's Go Further - 2021.pdf
7.7 MB
Forwarded from Yasin Gorgij
lets-go-web-applications.zip
19.1 MB
Let's Go (2nd Edition)