Comments (3)
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.
Forgot to ask, but can you please post the exact error you get?
from sematable.
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)
- Storybook example full of Errors HOT 1
- Consider using deep equality checks for data
- Add an online demo? HOT 4
- Need one example of the following... HOT 1
- Custom properties for components? HOT 1
- Table without Primary key HOT 2
- Add support for multiple primaryKey columns
- Showing Incorrect page size HOT 1
- Getting Filtered Data HOT 8
- Text Search not working HOT 1
- Possible to add available actions? HOT 1
- can 'sortKey' be a function? HOT 3
- how can I specify a default page size of 'All'? HOT 4
- How can we use SemaTable using MaterialUi Components HOT 1
- Unable to use component column HOT 2
- Implement better paging for tables with lots of pages
- Make selectable a bool or a function
- If column is filterable show filter icon in the header...
- Filter text is not restored from the state HOT 3
- TypeError: Cannot read property 'object' of undefined HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sematable.