To rotate session tokens in a React application using cookies, you can follow these general steps:
1. Create a new session token when a user logs in or the current session token is close to expiring.
2. Store the new session token in a cookie and send it to the client.
3. Update the server-side session data with the new session token.
4. When subsequent requests are made by the user, verify that the session token in the cookie matches the one stored on the server.
5. If the session token does not match or is expired, require the user to log in again to obtain a new session token.

Here's an example implementation of rotating session tokens in a React application using cookies:

```js
// Set the cookie
function setSessionToken(token) {
  Cookies.set("sessionToken", token, { secure: true, httpOnly: true });
}

// Create a new session token and set the cookie
function rotateSessionToken() {
  const newToken = generateNewToken();
  setSessionToken(newToken);
}

// Verify the session token on each request
function verifySessionToken(req, res, next) {
  const sessionToken = Cookies.get("sessionToken");

  if (!isValidToken(sessionToken)) {
    return res.status(401).send("Unauthorized");
  }

  // Update the session token with a new one if necessary
  if (isNearExpiration(sessionToken)) {
    rotateSessionToken();
  }

  // Call the next middleware function
  next();
}
```

In this example, the `rotateSessionToken` function generates a new session token and sets it in a cookie using the `setSessionToken` function. The `verifySessionToken` middleware function checks the validity of the session token on each request and rotates it if necessary using the `rotateSessionToken` function.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence