.17 -> .18 initialization
See original GitHub issueDo you want to request a feature or report a bug?
bug
What’s the current behavior?
.17 initializes correctly with:
import * as moment from 'moment';
import BigCalendar from 'react-big-calendar';
and then
BigCalendar.momentLocalizer(moment);
But when I use .18, the BigCalendar variable isn’t initialized, so the momentLocalizer method doesn’t exist and it throws an error that BigCalendar is undefined. Did something change from .17 to .18 that changed the initialization?
What’s the expected behavior?
BigCalendar object should be initialized and ready to render.
Sorry for the relative paucity of details. Given that this issue is with the barest beginning of use, I feel like it’s pretty quick to reproduce.
Issue Analytics
- State:
- Created 5 years ago
- Comments:20
Top Results From Across the Web
Has the C++17 extension to aggregate initialization made ...
It is true that C++17 has now added a new aggregate construction method, but it leading to a problem here relies on your...
Read more >Initialization in C++ is Seriously Bonkers - No TV and No Beer
The trend is to be more permissive of what is considered an aggregate. For example, public base classes are allowed in aggregates as...
Read more >Initialization in modern C++ - Timur Doumler - YouTube
Initialization in modern C++Timur DoumlerMeeting C++ 2018Slides: https://meetingcpp.com/mcpp/slides.
Read more >Constant initialization - Andrzej's C++ blog - WordPress.com
In short, this is a new way global, static and thread-local objects (not necessarily constant) can be initialized without running into problems ...
Read more >abseil / Tip of the Week #146: Default vs Value Initialization
TotW #18: String Formatting with Substitute · TotW #24: Copies, Abbrv. ... TotW #175: Changes to Literal Constants in C++14 and C++17.
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 FreeTop 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
Top GitHub Comments
Same issue here using a react+typescript application (
create-react-app
withreact-scripts-ts
).In our case
BigCalendar
was initialized correctly when in develop mode, but when creating a bundle the variable was undefined.As a workaround I use
require
instead ofimport
:It’s okay. I’m not using
no-var-requires
.