Giter Club home page Giter Club logo

Comments (3)

amir-hadzic avatar amir-hadzic commented on August 30, 2024

Hi,

Assuming that there's nothing wrong in AppsTable, yes, that is how you would use it. Unfortunately, we haven't used or tested sematable with server-side rendering yet, so it's possible that there are some issues.

Maybe you can find some tips here: http://redux.js.org/docs/recipes/ServerRendering.html in case it's not an issue in sematable.

I will keep this issue opened, and try to test sematable with server-side rendering. Thanks for reporting this!

from sematable.

amir-hadzic avatar amir-hadzic commented on August 30, 2024

Forgot to ask, but can you please post the exact error you get?

from sematable.

malte79 avatar malte79 commented on August 30, 2024

Aha, I see.

The exact errors are (it throws 2):

------snip------

Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
(client) -reactid="123"><div class="row" data-rea
(server) -reactid="123">

<
printWarning @ app.js:1830
warning @ app.js:1854
_mountImageIntoNode @ app.js:27196
mountComponentIntoNode @ app.js:26801
perform @ app.js:15125
batchedMountComponentIntoNode @ app.js:26815
perform @ app.js:15125
batchedUpdates @ app.js:24312
batchedUpdates @ app.js:13778
_renderNewRootComponent @ app.js:27009
_renderSubtreeIntoContainer @ app.js:27090
render @ app.js:27111
render @ app.js:117293
(anonymous) @ app.js:10458
webpack_require @ app.js:556
fn @ app.js:87
(anonymous) @ app.js:587
webpack_require @ app.js:556
(anonymous) @ app.js:579
(anonymous) @ app.js:582

app.js:1398 Uncaught Error: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's render method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).
at invariant (app.js:1398)
at Object.addComponentAsRefTo (app.js:14418)
at attachRef (app.js:14280)
at Object.ReactRef.attachRefs (app.js:14299)
at ReactDOMComponent.attachRefs (app.js:14108)
at CallbackQueue.notifyAll (app.js:14012)
at ReactReconcileTransaction.close (app.js:24730)
at ReactReconcileTransaction.closeAll (app.js:15191)
at ReactReconcileTransaction.perform (app.js:15138)
at batchedMountComponentIntoNode (app.js:26815)

------snip------

For the first error, it seems to be the case that when the server tries to include the sematable-wrapped AppsTable component, it is not initialized (I did some debugging and found this to be the case) and so it doesn't render anything. For some reason I couldn't figure out, it doesn't get initialized either, so the result of the server side render() of the parent class becomes just the contents of the parent class, nothing from AppsTable.

For the second error, I believe it is related to how we wrap the AppsTable class with sematable(). Does that make it so the actual react markup gets rendered independently outside of the parent class render()?

from sematable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.