Differences to React: default state shape
See original GitHub issueclass App extends Component {
render() {
console.log(this.state) // react: null | preact: {}
}
}
Can PR if you want to mention it.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Choosing the State Structure - React Docs
When you write a component that holds some state, you'll have to make choices about how many state variables to use and what...
Read more >Comparison of state management solutions for React - Medium
I also wanted to provide an initial state to each state management library so that i have got the possibility to write integration...
Read more >React State vs Props: Understanding the Difference
Understanding the differences: React State vs Props ; Initial Value Requirement, Passed from parent component, can be empty, Needs an initial ...
Read more >Here's how to optimize the state shape of your React app with ...
Initial state shape approach · Replace arrays by objects · Including comments for each tweet · Putting it all together · Selectors.
Read more >How can I specify the shape of the state in a React/Redux ...
Perhaps because English is not my mother tongue, I'm not aware of that subtle difference. – eddy. Jun 28, 2017 at 16:08. Add...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Still
{}
in Preact X: https://codesandbox.io/s/heuristic-bohr-t586nWe had
null
for a while in X but changed it back to an empty object for size reasons 👍