Skip to content

Commit

Permalink
Merge branch 'canary' into FormData
Browse files Browse the repository at this point in the history
  • Loading branch information
vinaykulk621 authored Jul 22, 2023
2 parents 286e571 + 04e46cb commit b32d8ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ You can invoke Server Actions using the following methods:
You can use React's `action` prop to invoke a Server Action on a `form` element. Server Actions passed with the action prop act as asynchronous side effects in response to user interaction.
```jsx filename="app/add-to-cart.js"
import { cookies } from 'next/headers'

export default function AddToCart({ productId }) {
async function addItem(data) {
'use server'
Expand Down
17 changes: 1 addition & 16 deletions examples/with-redux/lib/redux/store.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
/* Core */
import {
configureStore,
type ConfigureStoreOptions,
type ThunkAction,
type Action,
} from '@reduxjs/toolkit'
import { configureStore, type ThunkAction, type Action } from '@reduxjs/toolkit'
import {
useSelector as useReduxSelector,
useDispatch as useReduxDispatch,
Expand All @@ -15,16 +10,6 @@ import {
import { reducer } from './rootReducer'
import { middleware } from './middleware'

const configureStoreDefaultOptions: ConfigureStoreOptions = { reducer }

export const makeReduxStore = (
options: ConfigureStoreOptions = configureStoreDefaultOptions
) => {
const store = configureStore(options)

return store
}

export const reduxStore = configureStore({
reducer,
middleware: (getDefaultMiddleware) => {
Expand Down

0 comments on commit b32d8ba

Please sign in to comment.