Server and client html don't matches but the content is the same in console.
Answered
Cape lion posted this in #help-forum
Cape lionOP
Setting up my working repo and yesterday everything was great. Today got some errors about content, like the server and the client didnt match. Trying to find the solution all the day. The problem is not in repo or in plugins in chrome. Tried in different browsers and nothing changed.
Where i should try to find the reason of this error?
Where i should try to find the reason of this error?
Answered by Cape lion
thank u guys! i already found a solution)
the problem was in numbers so i replace this regexp to Intl.NumberFormat and it helped
the problem was in numbers so i replace this regexp to Intl.NumberFormat and it helped
16 Replies
can u send me the compoentn u suspect is throwing the error
@gin something is malformed in ur tsx
Cape lionOP
<span className="productPriceCurrentList">
{price.toLocaleString().replace(/,/g, ' ') + '₽'}
</span>suppose its somewhere here..
the component is quite big.. i can send u a file in dm if u dont mind to)
u should never call a function inside tsx
maybe thats the issue?
@gin u should never call a function inside tsx
Cape lionOP
its not mine code)
is that component serverside
so no "use client"
Cape lionOP
it works well for other devs in my team
so i think it smt wrong just with my pc
so i think it smt wrong just with my pc
Cape lionOP
thank u guys! i already found a solution)
the problem was in numbers so i replace this regexp to Intl.NumberFormat and it helped
the problem was in numbers so i replace this regexp to Intl.NumberFormat and it helped
Answer
Glad it worked