Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist state application on nextjs 13 #854

Closed
mmspring13 opened this issue Feb 9, 2024 · 1 comment
Closed

Persist state application on nextjs 13 #854

mmspring13 opened this issue Feb 9, 2024 · 1 comment
Labels
bug Something isn't working Stale unconfirmed Needs triage.

Comments

@mmspring13
Copy link

mmspring13 commented Feb 9, 2024

Description

Description

I have same proble #496. But NextIntlClientProvider doesn’t helps for me.
If possible, I think it will be very useful to add a solution to this problem with one of the examples. For example, here example-app-router the problem is reproduced

Mandatory reproduction URL (CodeSandbox or GitHub repository)

https://github.com/amannn/next-intl/tree/main/examples/example-app-router

Reproduction description

Steps to reproduce:

  1. Clone repo example-app-router
  2. Create simple component like:

import { useState } from 'react'

function Cocoa() {
  const [count, setCount] = useState(0)
  const [name, setName] = useState('')

  return (
    <div
      style={{
        position: 'absolute',
        width: '600px',
        height: '200px',
        backgroundColor: 'orange',
        top: '40px',
        left: '40px',
        color: 'black',
        fontSize: '24px'
      }}
    >
      <button type='button' onClick={() => setCount(prev => prev += 1)}>
        +
      </button>
      <span>count {count}</span><br />
      <span>name {name}</span>
      <button type='button' onClick={() => setCount(prev => prev -= 1)}>
        -
      </button>
      <input
        type="text"
        value={name}
        onChange={
          e => setName(e.target.value)
        }
      />
    </div>
  );
}

export default Cocoa;
  1. Use him on any page
  2. Change language

Expected behaviour

the state and context are preserved

@mmspring13 mmspring13 added bug Something isn't working unconfirmed Needs triage. labels Feb 9, 2024
Copy link

This issue has been automatically closed because there was no recent activity and it was marked as unconfirmed. Note that issues are regularly checked and if they remain in unconfirmed state, they might miss information required to be actionable or are potentially out-of-scope. If you'd like to discuss this topic further, feel free to open a discussion instead.

@github-actions github-actions bot added the Stale label Mar 11, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

1 participant